Java参数传递问题

时间:2021-07-12 23:30:38

参考资料: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;
}
}

图片解析:

Java参数传递问题