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 physical address?
In garbage collection, due to memory compaction objects shifting takes place in the memory. If I call hashcode before and after the GC, will it return the same hashcode (it returns) and if yes then why (because of compaction address may change) ?