I believe that you are making the right distinction between the same and equal.
Two pointers pointing to the same address mean that they point to the same object. So yes: the same address means the same object and therefore equal (although equality only makes sense if we are talking about more than 1 object).
The same attributes do not necessarily mean the same object. For instance. you can have two users with the same name "John Doe". The objects that represent them will still be different objects, so they cannot be used interchangeably. However, if you have a Point class, then two different instances of {1, 2} do represent the same thing and can be used interchangeably.
There is a big problem of the difference between the values ββof objects and reference objects or persons , so I suggest looking at it.
eg. if you have the Point class, then two different instances of {1, 2} really represent the same thing, unlike the previous user example.
source share