Comparable实现方法如下,报了ClassNotFoundException,这是什么情况 求解
public int compareTo(Student o) {
// TODO Auto-generated method stub
if(this.id.compareTo(o.id) == 0){
return this.name.compareTo(o.name);
}else{
return this.id.compareTo(o.id);
}
}
public int compareTo(Student o) {
// TODO Auto-generated method stub
if(this.id.compareTo(o.id) == 0){
return this.name.compareTo(o.name);
}else{
return this.id.compareTo(o.id);
}
}
2016-07-21
举报