标签:turn equals als equal 重写 user object bool str
@Override
public boolean equals(Object obj) {
if(obj==null)
return false;
if(obj==this)
return true;
if(obj instanceof User){
User use=(User)obj;
return use.name.equals(this.name);
}
return false;
}
标签:turn equals als equal 重写 user object bool str
原文地址:http://www.cnblogs.com/shuaiwenxin/p/6871506.html