用可以在其他类中使用的字段和功能定义一个抽象类。
abstract class Schedule { public String scheduleYear; /* 来 自* 时 代 J a v a - nowjava.com */ public String teamName; public Schedule(){} public Schedule(String teamName){ this.teamName = teamName; } // 来自 nowjava - 时代Java abstract void calculateDaysPlayed(int month); } class TeamSchedule extends Schedule { public TeamSchedule(String teamName) { super(teamName); } @Override void calculateDaysPlayed(int month) {