Relationship between equal method and hashCode method?
The relationship between equal method and hashCode method is like a contract.
- If two objects are equal, they must have the same hashCode
- If two objects have the same hashCode, it can equal or not equal