show to initialize a set with a collection in java code example Example: HashSet h = new HashSet(); HashSet<String> h = new HashSet<String>();