Possible Duplicate:
How to get adress of a Java Object?
Memory address of variables in Java
Is there a way in Java to see or write the heap address of an object. Say I have a Long Object
Long mylong = Long.valueof(1);
I want to see the heap address of mylong instead of its value (1). I am just curious if it is possible! I know it is possible and may be it is not useful in the application. But I just looking for a way to know how the JVM is working in some cases.
If you a tool which do this like an eclipse plugin I will appreciate if you let me know about it!