Java Java Data Structures Efficiency! Custom Serialization

Adam Sawicki
Adam Sawicki
15,967 Points

.equals() Overriding ?


I just wonder if @craigdennis should Override the method .equals in class to properly compare two Song objects? I assume that in this implementation statement:

if(song1.equals(song2)){ return 0; }

will never be satisfied because .equals() method compares - references to the object - by default and this equality will never happen.