When we want to sort the collection, if the elements of the collection is the basic data types, that okay, you can directly call the sort method in the Collections utility class just fine.
But if the type is our custom, we would have to go to achieve compareTo method of the Comparable interface.