News

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.
In this Java 101 tutorial, I’ve explained how interfaces differ from classes, and showed you how to declare, implement, and extend interfaces in your Java programs.