Java’s SortedSet interface and the classes that implement it (like TreeSet) will store a collection of objects that are sortable. In order to make a class sortable so that we can store it in a sorted collection, we have two choices: the sorted class can implement the Comparable interface we can pass a Comparator to [...]
October 31, 2009
