在Effective Java Item 9中(当你覆盖equals时总是覆盖hashCode)
Many classes in the Java platform libraries,such as String,
Integer,and Date,include in their specifications the exact value
returned by their hashCode method as a function of the instance value.
This is generally not a good idea,as it severely limits your ability
to improve the hash function in future releases.
这是什么意思 ?
最佳答案
原文链接:https://www.f2er.com/java/438268.html