比如说谁帮我理解下下面的代码啊?谢谢!
public class Test01 {
String s = new String("good");
String[] ss = {"aaa"};
public void m_method(String str,String[] sa) {
str = "bad";
sa[0]="bbb";
}
public static void main(String[] args) {
Test01 t1 = new Test01();
t1.m_method(t1.s,t1.ss);
System.out.println(t1.s+t1.ss[0]);
}
}
这道题 的输出是goodbbb
我想知道为什么?