从TreeMap获取同步映射
import java.util.TreeMap; import java.util.Collections;/*来 自 N o w J a v a . c o m - 时 代 Java*/ import java.util.Map; public class Main { public static void main(String[] args) { TreeMap treeMap = new TreeMap(); Map map = Collections.synchronizedMap(treeMap); } }