Skip to content

Tag: hashset

How to find an object in a Set of custom objects

The code below contains a Set of CustomObjects. I am trying to search an object in it. I’ve overridden equals() method to match it with a specific field, am not able to understand why is it not able to find it. “XXtNot FoundtXX” is getting printed instead of “Found!!” import java…