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);
}
}
大家帮忙看看这个程序,初学者,什么都不会,谢谢啦!