试题查看

首页 > 计算机二级考试 > 试题查看
【单选题】

指出下列程序运行的结果()public classExample{ String str=new String("good"); char[]ch={’a’,’b’,’c’}; public static void main(String args[]){Example ex=newExample(); ex.change(ex.otr,ex.ch); System.out.print(ex.str+"and"); System.out.print(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
查看答案解析

参考答案:

正在加载...

答案解析

正在加载...

根据网考网移动考试中心的统计,该试题:

2%的考友选择了A选项

88%的考友选择了B选项

2%的考友选择了C选项

8%的考友选择了D选项

你可能感兴趣的试题

n个顶点的强连通图的边数至少有________。A.n-1B.n(n-1)C.nAppendblank命令的作用是________。A.编辑记录B.在第1条记录如下程序是为变量i赋值。若程序的输出结果是180。请将程序补充完整。注意:不改动下列程序段的输出是()。publicclassTest{publicstatic执行下列程序段之后,变量b的值为______。publicclassTest9{下列程序的执行结果是______。classA5extendsThread{bo