You are right. equals() is more appropriate here, because we only care whether the value of the two objects are the same not the object itself.