How to compare objects using the Comparable and Comparator interfaces.