Why can hashCode() return the same value for different objects in Java?

后端 未结 6 1118
粉色の甜心
粉色の甜心 2020-12-01 04:51

A quote from the book I\'m reading Head First Java:

The point is that hashcodes can be the same without necessarily guaranteeing that the objects are

6条回答
  •  我在风中等你
    2020-12-01 05:13

    I have to think that's a pretty inefficient hashing algorithm for 2 objects to have the same hash code.

提交回复
热议问题