To initialize the values of a HashSet when constructing the set, you can use one of the HashSet constructors that takes a Collection as an argument.