Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Misconception: Students think that two different variables cannot refer to the same object.

Share Misconception: Students think that two different variables cannot refer to the same object. with FacebookShare Misconception: Students think that two different variables cannot refer to the same object. with Twitter
  • Explain to students that a single object can have multiple variables assigned to it.
    • This property can be useful if students need to use the object in different places, or need to store both the object’s old and new values.

More about this tip

Tags

  • Content Misconceptions
  • Programming Concepts
  • CS 1
  • Intro Programming
External Source

"Visual program simulation in introductory programming education" by Juha Sorva.

Other Tips By
Other Tips By Juha Sorva

Similar tips

Ask students “Do we need a loop here?” to help them determine the appropriate loop to use without having to know the proper syntax to write that loop.
Misconception: With conditionals, students may try to compare the memory address of a function to a number, like x < foo, when they intended to compare x with the return value of foo.
Cover the outer-loop of nested loops when tracing through loops to help students see the inner loop runs just like a single loop during execution to help students understand nested loops.
  • CSTT Facebook
  • CSTT Twitter

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Footer Icons by Mohammed Alyousfi. Powered by Drupal.

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College