Class SortingExamples
java.lang.Object
net.jrodolfo.java_evolution.java02.SortingExamples
Demonstrates Java 2 collection sorting with
Comparable and
Comparator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsortByLength(List names) Sorts names by length using a comparator object.sortNaturally(List numbers) Sorts values by their natural ordering.
-
Constructor Details
-
SortingExamples
public SortingExamples()
-
-
Method Details
-
sortNaturally
-
sortByLength
-