Java examples for Collection Framework:TreeSet
Get Synchronized Set from TreeSet
import java.util.TreeSet; import java.util.Collections; import java.util.Set; public class Main { public static void main(String[] args) { TreeSet treeSet = new TreeSet(); // ww w. java 2 s . c o m Set set = Collections.synchronizedSet(treeSet); System.out.println("done"); } }