问题描述
|
我有这个:
class undefinedException extends Exception {
super(\"Its not defined!\");
}
但我得到:
类型的非法开始
怎么了?
谢谢
解决方法
它应该是
class UndefinedException extends Exception {
public UndefinedException() {
super(\"Its not defined!\");
}
}
, 您需要将super
调用放入构造函数中。