代码
代码如下:
Collections.sort(list, new Comparator<PCB>() {
@Override public int compare(PCB o1, PCB o2) {
return o2.getID() - o1.getID();;
}});
代码如下:
Collections.sort(list, new Comparator<PCB>() {
@Override public int compare(PCB o1, PCB o2) {
return o2.getID() - o1.getID();;
}});