Get Synchronized Set from Java HashSet
import java.util.Collections; import java.util.HashSet; import java.util.Set; public class Main { public static void main(String[] args) { HashSet hashSet = new HashSet(); Set set = Collections.synchronizedSet(hashSet); } }