-1

In Computer, variables are either accessed by name or the memory location. So is reference ID in java same as memory address?

1 Answers1

1

No. Memory addresses are usually represented by something like 'Fx012450001235' that will reference a starting point in the computer memory.

When Java prints to you something like 'ObjectClass@a2saA', that is some form of object index of the current JVM thread, not the memory address of the object you are using.

BBacon
  • 2,456
  • 5
  • 32
  • 52