Collections.sort(tmp, new Comparator<Integer>() {
@Override
public int compare(Integer o1, Integer o2) {
return o2 - o1;//表示降序,反之升序,傻傻分不清
}
});
ArrayList的排序
最新推荐文章于 2023-05-27 14:57:53 发布