If you are overriding equals() method of a class, then the other methods you might need to override is hashCode().