No. The primitive boolean
has been left out. But it would never be used if it existed.
Arrays.sort( Object )
Inspect this method:
static void sort(Object[] a)
Recall that Object
is the ancestor of all objects in Java.
An array of object references can be sorted as long as
all references point to objects that implement the Comparable
interface.
The only method in this interface is the compareTo()
method.
If a class has a compareTo()
method in it, is that enough to work with
Arrays.sort()
?