The Comparable interface is simple because it only has one method; however, implementing the compareTo method can become tedious if you need to sort your object by multiple properties (especially if ...
> Whenever you implement a value class that has a sensible ordering, you should have the class implement the `Comparable` interface so that its instances can be easily sorted, searched, and used in ...
Very soon we’ll talk about the details of sorting algorithms, but before that let’s look at how Java’s built-in library handles sorting. In this set of notes, we’ll look at sorting arrays, sorting ...