Why is it important to override `hashCode()` along with `equals()`?
Overriding both `hashCode()` and `equals()` is important because the contract ensures that objects that are considered equal also have the same hash code, which is necessary for the correct behavior of hash-based collections.
Great! You've captured the essence of the `hashCode()` and `equals()` contract.
Can you explain what could happen if `equals()` is overridden but `hashCode()` is not?