JAVA 虚类简单问题。
public interface ActionListener extends EventListener {
/**
* Invoked when an action occurs.
*/
public void actionPerformed(ActionEvent e);
}
public abstract class OutputAction extends ActionListener {
public OutputAction(ProgramInfo programInfo) {
this(programInfo, "出力");
}
public abstract void actionPerformed(ActionEvent e) throws OfsException;
}
上面连个类。。第二给类编译的时候有错。
Multiple markers at this line
- implements java.awt.event.ActionListener.actionPerformed
- Exception OfsException is not compatible with throws clause in
ActionListener.actionPerformed(ActionEvent)
WHY?