Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Collections.sort(students, new Comparator<Student>() {
- @Override
- public int compare(Student t, Student t1) {
- return t.getTotalAbsence() > t1.getTotalAbsence() ? 1 : -1;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement