title: System.out.println(); prints false with == operator
body: <p>Can you please explain me why the output is</p>
  <pre><code>false
  </code></pre>
  <p>instead of</p>
  <pre><code>abcd abc false
  </code></pre>
  <p>Code:</p>
  <pre><code>public class StringDemo{
      public static void main(String [] args){
          String s1 = &quot;abc&quot;;
          String s2 = s1;
          s1+=&quot;d&quot;;
          System.out.println(s1+ &quot; &quot;+ s2 +&quot; &quot;+ s1==s2); //false
      }
  }   
  </code></pre>