Here you can find the source of createSet(Collection toCopy)
public static Set createSet(Collection toCopy)
//package com.java2s; import java.util.*; public class Main { public static Set createSet() { return new HashSet(); }//from w w w .j a v a 2 s . c o m public static Set createSet(Collection toCopy) { return new HashSet(toCopy); } }