Why two objects with the same hashcode are not necessarily equals? [duplicate]
问题 This question already has answers here : What issues should be considered when overriding equals and hashCode in Java? (11 answers) Closed 3 years ago . Currently I drilled into the JSE source code for fun. From some tutorials I found a principle two equals objects (i.e. as to object a and b a.equals(b) returns true) must have the same hashcode, on the other hand, two objects with the same hashcode are not necessarily equals . According to the HashTable source code of Java API (http:/