首页上一页 1 下一页尾页 1 条记录 1/1页
按书上的例子打出现错误为什么
发表在Java图书答疑
2010-05-28
是否精华
是
否
版块置顶:
是
否
public class Person implements Comparable {
private String name;
private long id_card;
public int compareTo(Object o){
Person p = (Person) o;
String s1 = CnToSpell.getFullSpell(this.name);
String s2 = CnToSpell.getFullSpell(p.getName());
return s1.compareTo(s2);
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getId_card() {
return id_card;
}
public void setId_card(long id_card) {
this.id_card = id_card;
}
}
String s1 =[font color=#0000FF] CnToSpell[/font].getFullSpell(this.name);
String s2 = [font color=#00FF00]CnToSpell[/font].getFullSpell(p.getName());按照书上例子打的怎么在eclipse下CnToSpell老是显示错误怎么改正
private String name;
private long id_card;
public int compareTo(Object o){
Person p = (Person) o;
String s1 = CnToSpell.getFullSpell(this.name);
String s2 = CnToSpell.getFullSpell(p.getName());
return s1.compareTo(s2);
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getId_card() {
return id_card;
}
public void setId_card(long id_card) {
this.id_card = id_card;
}
}
String s1 =[font color=#0000FF] CnToSpell[/font].getFullSpell(this.name);
String s2 = [font color=#00FF00]CnToSpell[/font].getFullSpell(p.getName());按照书上例子打的怎么在eclipse下CnToSpell老是显示错误怎么改正