abstract class WeekDay{
public final static WeekDay SUN=new WeekDay(){
public WeekDay getNextDay(){
return MON;
}
public String toString(){
return "SUN";
}
};
abstract WeekDay getNextDay();
abstract String toString();//用myeclipes编辑的时候提示说这行代码前面要加public,可是我的子类覆盖方法是public的啊,权限比较大啊,奇怪的是上面一行就不提示加public,求大神帮我解决一下啊。 |