Song2.compareTo method is not at all called in this case. Because Song2 objects are added to ArrayList, which is not 'sorted' and hence doesn't need compareTo method implementation. However if Song2 objects were being added to a sorted collection such as TreeSet, then compareTo would have been called. In that case 'caller' will be TreeSet object, and called on Song2 objects.
I m afraid. compareTo () method is called when Collections.sort() is called .
Here ArrayList contains Song2 objects which implements comparable interface. Collections.sort() will actually compareTo() method to sort it .