If I'm reading your question correctly, you're wondering how / when compareTo() is being called.
Arrays.sort(list) doesn't use some magic to sort the records in the list. It uses the output of several compareTo()'s in order to judge which array items go where. See Array.java
private static void mergeSort(Object src[], Object dest[], int low, int high, int off) in your
java src.zip if you really want all the details.
Secondly, compareTo is also used in binarySearch when attempting to find lopa. The call iterates from array index 0 calling compareTo() on each record until the result is 0 or greater. If the result is greater than 0, the search failed. If the result is 0, the search successfully found a 'matching' value. This doesn't mean its the same object, or the same anything, but the comparator deems them to be equal enough.
Commenting out the compareTo()'s implementation and setting 1 as a result means that binarySearch will never find a matching record and that when sorted, and that either the array will be stored in one of two orders: Babu, Suman, lopa or lopa, Suman, Babu. It all depends on how the sort was implemented.
One final note, lopa has a LOWER case leading character which means that it won't be equated to in the same way you may be hoping for. Read the
String's compareTo() javadoc for details on how it is actually implemented.