Java Java Data Structures Efficiency! Custom Serialization

Araz kuberin
Araz kuberin
6,045 Points

equals method

@Override public int compare(Song song1, Song song2){ if(song1.equals(song2)){ return 0; } return song1.mTitle.compareTo(song2.mTitle); } });
return songs; }

in the code above are we using the equals method in the class Comparator if yes what does it compare ?? the references of two objects or everything inside the objects??