Comparator Interface in java : A complete tutorial
Comparator interface in java is used to sort the elements of collection in some specific orders. Features of Comparator interface 1) Comparator is present in java.util package. 2) Comparator has two methods – compare() and equals() method. Comparator Interface Methods There are two methods defined by the comparator interace 1) Public int compare( object obj1 ,object …
Comparator Interface in java : A complete tutorial Read More »