TreeMap排序
ArrayList<Integer> list = new ArrayList<Integer>();
TreeMap<Integer, Integer> tm = Calculate.tjj(0);
// 倒序
NavigableSet<Integer> descendingKeySet = tm.descendingKeySet();
// 顺序
// Set testset = tm.keySet();
Iterator<Integer> it = descendingKeySet.iterator();
while (it.hasNext()) {
int key = it.next();
System.out.println("key:" + key);
int paramObject = tm.get(key);
System.out.println(paramObject);
list.add(paramObject);
}
作者“test”
补充:软件开发 , Java ,