不定项选择题 下列程序的输出结果是______。
   public class Example{
   String str=new String("good");
   char ch[]={'a','b','c');
   public static void main(String args[]){
   Example ex=new Example();
   ex.change(ex.str,ex.ch);
   System.out.printin(ex.str"and"ex.ch);
   }
   public void change(String str,char ch []){
   str="test ok"; ch[0]='g';
   }
   )
   A.good and abc    B.good and gbc
   C.test ok and abc D.test ok and gbc
【正确答案】 B
【答案解析】Java中的参数传递全是值传递,所不同的是,对于引用类型来说,变量内部存放的是对象内存空间的引用,所以引用类型在进行参数传递时,是将引用拷贝给形式参数。所以在方法中绝不可能改变主调方法中引用变量的引用,但是可能改变主调方法中引用变量的某一属性(就像对ch[0]的改变一样)。