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

Misconception: Students get confused with object-oriented programming in Python because function declarations explicitly take self as an argument, but function calls don’t use self as argument.
Introduce object states early when teaching object-oriented programming.
Tell students they have to believe that some things just work before they will understand why it works because they need exposure to a lot of material before some concepts make sense individually.
  • 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