public class Student.GradeComparator extends Object implements Comparator<Student>
Comparator
implementation for comparing students based on grades.Constructor and Description |
---|
Student.GradeComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Student o1,
Student o2)
Compares two students' grades for descending order sorting.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public int compare(Student o1, Student o2)
compare
in interface Comparator<Student>
o1
- the first Student to be comparedo2
- the second Student to be compared