to chec if the element is present in hash set java code example Example: check if value exists in hashset java hSet.contains(new Integer("3"));