0 votes
in JAVA by
Is it possible for two unequal objects to have the same hashcode?

1 Answer

0 votes
by

Yes, two unequal objects can have same hashcode that's why collision happen in a hashmap.

the equal hashcode contract only says that two equal objects must have the same hashcode it doesn't say anything about the unequal object.

...