If a.x is 5 And b.x is 5 why is it not equal?
Because you have two different objects: a and b. They having the same value is irrelevant: they are still two different objects.
it's different references
Actually ahiad what happens if you are using == then it compares the reference object like a, b both are unequal so it is false
Though the content in each object is same, they are stored in different memory locations and hence they are two different objects
Two different instances
Is this the first discuss thing ever posted on sololearn?