Here you can find the source of newHashSet(String... strings)
private static final HashSet<String> newHashSet(String... strings)
//package com.java2s; //License from project: Open Source License import java.util.Collections; import java.util.HashSet; public class Main { private static final HashSet<String> newHashSet(String... strings) { HashSet<String> set = new HashSet<String>(); Collections.addAll(set, strings); return set; }//from w w w .j av a 2 s .co m }