If I call the Object.hashcode()
method on some object it returns the internal address of the object (default implementation). Is this address a logical or phys
In this link it says that indeed the default hash code is the JVM address of the object, but if it is moved - the address stays consistent. I don't know how reliable this source is, but I am sure that the implementors of this method thought of this scenario (which is not rare or corner case), and ensured correct functionality of this method.