Sorting an array of Comparable<T> objects.