public boolean equals(Object obj) { System.out.println("equals.."+this); Person p=(Person)obj; return this.name.equals(p.name) && this.age==p.age; } 为什么重写hashcode和equals时,输出this会报错?
收起
输出的错误是什么,起码要对应错误来分析
报告相同问题?