java how to look if an object exists in hashset code example Example: check if value exists in hashset java hSet.contains(new Integer("3"));