javareferencehashcode

difference between hash code and reference or address of an object?


difference between hash code and reference or address of an object?


Solution

  • In JavaME, these three things are unrelated.

    An object's hashCode is a semi-unique identifier for it.

    A reference to an object is a scoped handle on that object.

    An object's address is (probably) unobtainable, and certainly useless.