public class ParamTest3{public void change(Person person,Person person2){person.name = "lisi";person2.name = "wangwu";}public static void main(String[] args){Person person = new Person();Person.name = "zhangsan";Person person2 = person;ParamTest3 test = new ParamTest3();test.change(person,person2);System.out.println(person.name);}}大家帮忙看看这个程序,初学者,什么都不会,谢谢啦!
3 回答
- 3 回答
- 0 关注
- 3991 浏览
添加回答
举报
0/150
提交
取消