Overriding hashCode() and equals()