The following article is purely theoretical. I don’t know if it fits a real-life use-case, but the point is just too good to miss :-) Java’s List sorting has two flavors: one follows the natural ordering of collection objects, the other requires an external comparator. In the first case, Java assumes objects are naturally ordered. From a code point of view, this means types of objects in the list must implement the Comparable interface. For example, such is the case for String