Collections.sort(actList, new Comparator<Act>() { @Override public int compare(Act o1, Act o2) { return o1.getEndDate().compareTo(o2.getEndDate());//顺序
/*return o2.getEndDate().compareTo(o1.getEndDate());//降序*/
}});
时间: 2024-11-08 15:14:27
Collections.sort(actList, new Comparator<Act>() { @Override public int compare(Act o1, Act o2) { return o1.getEndDate().compareTo(o2.getEndDate());//顺序
/*return o2.getEndDate().compareTo(o1.getEndDate());//降序*/
}});