In Computer, variables are either accessed by name or the memory location. So is reference ID in java same as memory address?
Asked
Active
Viewed 125 times
-1
-
1So what do you mean with "reference ID"? – Gyro Gearless Aug 22 '18 at 12:53
-
This diagram may be helpful for your understanding [link](https://drive.google.com/file/d/1ZNqUJ5-X3CbeYXMDkBr0H2u2Svh19viK/view?usp=sharing) – Devansh Verma Aug 23 '18 at 17:48
1 Answers
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