public class Test {
public static void main (String [] args) {
TestMathRandom x = new Test();
StringBuffer a = new StringBuffer ("A");
StringBuffer b = new StringBuffer ("B");
x.operate (a,b);
System.out.println(a + "," +b);
}
void operate (StringBuffer x, StringBuffer y) {
x.append(y);
y = x;
}
}
Ans is AB,B 请告诉我为什么 b 的值不变。