java的一道笔试题:
public class Test {
public static void main(String[] args){
String str = "aa";
A a = new A();
System.out.println("str="+str);
System.out.println("a.str="+a.str);
}
public void transform(String str,A a){
str = "aaaaa" ;
a.change("bbbbb");
}
}
class A{
public String str = "bb";
public void change(String str){
this.str = str;
}
}
结果:??