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