Nuacht
Listing 2 imports the java.util.Comparator functional interface, which describes a function that can perform a comparison on two objects of arbitrary but identical type.
A comparator is an object of a class that implements the Comparator interface, which defines methods that allow you to compare two objects to sort them.
If you want to take advantage of sorting methods in Java, you'll need to implement the Comparable interface.
Cuireadh roinnt torthaí i bhfolach toisc go bhféadfadh siad a bheith dorochtana duit
Taispeáin torthaí dorochtana