equals()
, you must override hashCode()
.hashCode()
method uses the memory address of the object. So if you don't override it,
it will cause equal objects to return different hash codes, which violates the specification.
See also this weirdly French video about "ashCode".