title: String vs StringBuffer returned value
body: <p>Can you please explain why in the following code <code>String</code> and <code>StringBuffer</code> are treated differently and when value is appended in <code>StringBuffer</code> but not in String.</p>
  <pre><code>public class MyClass {
      
      public static void main(String args[]) {
          String str = new String(&quot;String Rohan &quot;);
      StringBuffer strBfr = new StringBuffer(&quot;String Buffer Rohan &quot;); 
          
          strUpdate(str);
          strBfrUpdate(strBfr);
          
          System.out.println(str);
          System.out.println(strBfr);
          
      }
      
      private static void strBfrUpdate(StringBuffer strBfr){
          strBfr.append(&quot;Kushwaha&quot;);
      }
      
      private static void  strUpdate(String str){
          str += &quot;Kushwaha&quot;;
      }
  }
  </code></pre>
  <p>Output is as follows:</p>
  <blockquote>
  <p>String Rohan</p>
  <p>String Buffer Rohan Kushwaha</p>
  </blockquote>