As per Java API spec, the signature of Collections.reverseOrder is
public static Comparator reverseOrder()
And the example gi
T is resolved based on the type of a.
T
a