参考资料:http://blog.sina.com.cn/s/blog_59ca2c2a0100qhjx.html
http://blog.csdn.net/a412588063/article/details/8782742
实例解析:
public class Test{
public static void main(String[] args){
StringBuffer a=new StringBuffer("A");
StringBuffer b=new StringBuffer("B");
operate(a,b);
System.out.println(a+","+b);
}
static void operate(StringBuffer x,StringBuffer y){
x.append(y);
y=x;
}
}
图片解析: