}
class Person
{
private String name;
private int age;
Person(String name,int age){
this.name=name;
this.age=age;
}
public String getName(){
return name;
}
public int getAge(){
return age;
}
public boolean equals(Object o){
if(!(o instanceof Person))
throw new RuntimeException("leixing bufu");
System.out.println(this。name);//打印调用者的名字
Person p=(Person)o;
return name.equals(p.getName())&&age==p.getAge();