多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

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
答案解析:
进入题库查看解析

微信扫一扫手机做题