public class TestMap {
public static void main(String[] args) {
Map<String,Object> map = new HashMap<>();
map.put("B", "2");
map.put("A", "1");
map.put("D", "4");
map.put("C", "3");
SortedMap<String, Object> temps = new TreeMap<>();//升序
temps.putAll(map);
System.out.println("ASCII排序:"+temps);
}
}