8.
public class TestPass {
String str = new String("hello");
char[] ch = {'a','b','c'};
public static void main(String[] args) {
TestPass ex = new TestPass();
ex.change(ex.str,ex.ch);
System.out.print(ex.str + " and ");
System.out.print(ex.ch);
}
private void change(String str,char[] ch) {
str = "test ok";
ch[1] = 'g';
}
}
程序运行结果?