This is due to a simple contract in Java that two objects considered equal must have the same hash-code, but not vice-versa. Let's take this for an example, where ... الإطلاع على المزيد
http://www.xyzws.com/javafaq/why-always-override-hashcode-if-overriding-equals/20