构建Map:
HashMap map = new HashMap();
map.put(1,4);
map.put(2,1);
排序:
ArrayList list = new ArrayList(map.entrySet());
list.sort(Map.Entry.comparingByValue());
构建Map:
HashMap map = new HashMap();
map.put(1,4);
map.put(2,1);
排序:
ArrayList list = new ArrayList(map.entrySet());
list.sort(Map.Entry.comparingByValue());