Arrays class has versions of
binarySearch() which don’t require a
Comparator. For example, you can use the version of
Arrays.sort() which just takes an array of objects. These methods call the
compareTo() method of the objects in the array.
Java get String CompareTo as a comparator object