Possible Duplicate:
what is an objects hashcode
How do hashCode() and identityHashCode() work at the back end?
I’m not talking about String class or any other class where the hashcode is overridden. Say if I just create a new object of the Object class, then will the hashcode() or to be true in any case, identityHashCode(Object x) return the memory address of that object?
Not necessarily. From the documentation (emphasis mine):