There are two distinct notions of "sameness" when it comes to objects.
You can test if two references point to the same object (identity comparison). This is rarely used; it is mostly useful with large, mutable objects where the object identity matters but the value is transient:
You can test if two objects are equal in a domain-specific sense, usually by being instances of the same class, and having equal slot values (value comparison):