运行以下代码时出现未报告的异常
我的代码如下所示
class Super {
public Super() throws Exception {
System.out.println("Super Class");
}
}
public class Sub extends Super {
public static void main(String[] args) throws Exception {
Sub s = new Sub();
}
}
得到以下错误: Sub.java:6: unreported exception java.lang.Exception in default constructor
public class Sub extends Super {
1 error