If you want to make Students comparable,
you should implement the Comparable interface instead. If you insist on making the Student class to be a Comparator as well, you have to use the sort method the following way :
This will tell the Collections class to use a new comparator to compare the Students. That looks awkward though. You should use Comparable instead.