我有一个会议类,我想创建一个扩展会议的 BusinessMeeting 类。
这是我的会议课:
public class Meeting {
private String name;
private String location;
private int start, stop;
public Meeting(String name, String location, int start, int stop) {
this.name = name;
this.location = location;
this.start = start;
this.stop = stop;
}
这是我的商务会议课程:
public class BusinessMeeting extends Meeting {
public BusinessMeeting() {
super();
}
}
在我的 BusinessMeeting 课程中,我收到错误消息:
类 Meeting 中的构造函数 Meeting 不能应用于给定类型;必需:String、String、int、int 找到:无参数
我不确定为什么会收到该错误消息。BusinessMeeting 类不应该继承我的 Meeting 类的所有变量吗?