指出下列程序运行的结果是()。 public class Example{ String str=new String("good"); char] ch={'a','b','c'}; public static void main(String args]){ Exampleex=new Example(); ex. change(ex. str, ex. ch); System. out. print(ex. str+"and"); System. out. print(ex. ch); } public void change(String str, char ch]){ str="test ok"; ch0]='g'; }} }
选项:
A:good
B:good
C:test
D:test
发布时间:2024-05-23 14:56:46