Is it possible that we can access memory location in Java directly or indirectly?
If we tries to print a object, it will print hashcode. Does hashcode signify indire
Probably not for a primitive data type. You might be able to get addresses of data areas used for object storage on a reference type, though Java Native Interface, we can access the C++ or C and from that we can get the Memory location.
It's sort of pointless, though. Because of garbage collection, any Java object can get moved in memory any time that any thread creates a new object