title: Assignment Operator in StringBuffer not working
body: <pre><code>public class Test
  {
      static void operate(StringBuffer x, StringBuffer y)
      {
          x.append(y);
          y=x;
      }
  
      public static void main(String args[])
      {
          StringBuffer x=new StringBuffer("Sun");
          StringBuffer y=new StringBuffer("Java");
  
          operate(x,y);
          System.out.println(x+","+y);
      }
  }
  </code></pre>
  
  <p>his Prints : SunJava,Java</p>
  
  <p>Can anyone please explain why it is printing like that instead of SunJava,SunJava ?</p>