public static class Student.StaticGradeComparator extends Object implements Comparator<Student>
Comparator
implementation as a static nested class, for comparing
students based on grades.Constructor and Description |
---|
Student.StaticGradeComparator() |
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 instanceo2
- the second Student instance