— If two objects are equal then they should have the same hascode but the reverse is not true (i.e. If two objects have the same hashcode does not mean that they are equal)

— You need to use the same attributes in your equals & hashCode methods

Advertisements