62,620
社区成员
发帖
与我相关
我的任务
分享
public static List<Integer> getList(List<Integer> list){
Collections.sort(list, new Comparator<Integer>() {
@Override
public int compare(Integer o1, Integer o2) {
return o1.intValue()-o2.intValue() ; //这里可以根据你的需要升序还是降序
}
});
return list ;
}

List list = new ArrayList();
for(Object o:map.values()){
list.add(o);
}