Archive for October, 2009

Java’s Sorted Collections and the Comparable and Comparator Interfaces

October 31, 2009

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 [...]

  • Share/Bookmark

Tags: , ,
Posted in Java | No Comments »