Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • About
  • Cards
  • 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 to consider which objects in the room are computers to further their understanding of what computing is. Use the phrasing "What different Computers do you see".
Misconception: students struggle with the onMousePress method (and other mouse interaction methods) in the Java objectdraw Library from Williams College; they need help understanding it’s called even when don’t explicitly call it.
Use Python as an introductory language rather than Java or C to allow students to focus on problem-solving more than syntax.
  • 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