题型:单选题 标签:代码
题目:
27. 有如下代码:
public class Test
{
public void change(String str,char ch[])
{
str="test ok";
ch[0]='g';
}
public static void main(String args[])
{
String str=new String("good");
char[]ch={'a','b','c'};
Test ex=new Test();
ex.change(str,ch);
System.out.print(str+"and");
System.out.print(ch);
}
}
上面程序的运行结果是______。
A.good and abc
B.good and gbc
C.test ok and abc
D.test ok and gbc