Overriding one and not the other
A class overrides equals to compare by id, and does not override
hashCode. Two instances with the same id are placed in a HashSet.
What happens?
A class overrides equals to compare by id, and does not override
hashCode. Two instances with the same id are placed in a HashSet.
What happens?