Skip to main content
CS Teaching Tips

Main navigation

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

Have students think about a reference to an object as a numeric memory address to help them understand how passing references works.

Share Have students think about a reference to an object as a numeric memory address to help them understand how passing references works. with FacebookShare Have students think about a reference to an object as a numeric memory address to help them understand how passing references works. with Twitter
  • Teaching students this deeper model of memory can often make more sense to them than something more abstract.
  • As such, have students conceptualize a references as numeric memory addresses, like 0x9FFF0 and 0x3106eb.
    • When an object is passed, its memory address is just being copied to the local variable being used.

More about this tip

Tags

  • CS 1
  • Intro Programming
External Source

Interview with Dave Musicant.

Other Tips By
Other Tips By Dave Musicant

Similar tips

Set aside class time to check in with students when they’re working on large (2-3+ weeks) group projects in order to catch them before they get derailed and create a project that doesn’t demonstrate assignment requirements.
Ask students "do you know in advance how many times you'll need to go through the loop?" when deciding between using a for or a while loop, because this is a good rule of thumb for them to use.
Misconception: Students have difficulty working with temporary variables in arrays.
  • 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