日期:2014-05-20  浏览次数:20723 次

子类为啥不能比父类抛出更多的异常?
来听听大家的意见?

------解决方案--------------------
探讨

最大问题是,如果调用者不知道这个异常,也就是这样:
Java code
public class Parent {
public void a() throw AException {
}
}
public class Child extends Parent {
public void a() throw AException, BException {
}……