equals()
And hashCode()
Contracts
- If two objects are equal according to the
equals()
method, then their hash codes must be equal as well.
- If two objects have the same hash code, they may or may not be equal according to the
equals()
method.
equals
hashCode
Links