I am trying to understand how the first output of the following piece of code returns "true"
As far as I know, the == operator compares two objects to determine if they are the same object in memory i.e. present in the same memory location. But here s1 and s5 point to different memory locations. Still how can the result be true ?