Look at the source code of Comparable. With implements Comparable
the method within student would be
public int compareTo(Object other) { ...
Using generics Comparable the method is like you wrote it.
By the way the compiler should have given you a helpful explanation.