public class SomeException { } Class a: public class a { public void doSomething() { } } Class b: public class b extends a { public void doSomething() throws SomeException { } } Which is true about the two classes?()
- A、 Compilation of both classes will fail.
- B、 Compilation of both classes will succeed.
- C、 Compilation of class a will fail. Compilation of class b will succeed.
- D、 Compilation of class a will fail. Compilation of class a will succeed.
正确答案:D
答案解析:有
微信扫一扫手机做题