using hashset in java check if exists code example Example: check if value exists in hashset java hSet.contains(new Integer("3"));