Does hashcode number represent the memory address? [duplicate]

Hashcode is not a unique identification. It’s just a number that helps you distinguish objects. Two different objects may have the same hash code and it is fine.

HashCode characteristics:

  1. If obj1 and obj2 are equal, they must have the same hash code.
  2. If obj1 and obj2 have the same hash code, they do not have to be equal.

Leave a Comment