0
How to output the memory address of a variable in Java?
2 Answers
0
partially you can get "hashcode" for objects
Integer n = 100, m = 200, x=m;
System.out.println( System.identityHashCode(n) );
System.out.println( System.identityHashCode(m) );
System.out.println( System.identityHashCode(x) );
there is a similar object.hashCode() but can be overwritten.
0
nice!