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

  • 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

External Source

Interview with Dave Musicant.