public class A
{
String str = new String("good");
char[] ch = {'a','b','c'};
public static void main(String[] args){
A a = new A();
a.change(a.str,a.ch);
System.out.print(a.str + "and");
System.out.print(a.ch);
}
public void change(String str, char[] ch){
str = "test ok";
ch[0] = 'g';
}
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |