In a class, where hashcode() has been overridden, we can still get the actual system generated hashcode of the object using :
System.identityHashcode(object)
How this info can be useful? when the hashcode() differs from SystemIdentityHashCode() it probably means that the equivalence of the objects is not determined by the memory and has its own implementation.
System.identityHashcode(object)
How this info can be useful? when the hashcode() differs from SystemIdentityHashCode() it probably means that the equivalence of the objects is not determined by the memory and has its own implementation.
No comments:
Post a Comment