“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
It means the actual JVM you have running at the moment. If you write java Foo or similar, you start a new instance of the JVM. The memory location of each object is different for different JVM instances.
Yes,I do agree.But when i created a class and its object,and tried to print the value of the reference variable,each and every time i got the same value for the reference variable.So,if the memory location of objact changes each time with new instances of jvm,how come the reference varaibles value is the same?
Does reference variable's value has anything to do with object's memory location?
thanks for having a look at the question.
Actually,I found out that,no,the value of reference variable and the value of object's memory address(obj.hashCode()) changes or may change with individual JVM instances.