}
class PersonDemo2
{
public static void main(String[] args)
下面是我写的代码 ,但是 调用comepare的方法时候出来的结果是ture,可以明明我初始化的一个是20,一个是25 怎么能是ture呢?
{
Person p = new Person();
Person p1 = new Person("lisi");
p1.setName("liqiang");
System.out.println(p1.getName());
Person p2 = new Person("zhangsan",20);
Person p3 = new Person("wangwu",25);
boolean b = p2.comepare(p3);
System.out.println(b);
}
}