可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

public class SomeException&


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.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、10. public class Class

10. public class ClassA { 11. public void methodA() { 12. ClassB classB = new ClassB()...

2、public class SyncTest 

public class SyncTest { private int x; private int y; private synchronized void setX( int&en...

3、public class TestApp{ 

public class TestApp{ public static void main(String[] args){       try{ String myn...

4、10. public class Class

10. public class ClassA { 11. public void count(int i) { 12. count(++i); 13. } 14.&en...

5、public class TestA{  &

public class TestA{   public void methodA() throws IOException{       //…… &...

6、public class TestFive 

public class TestFive { private int x; public void foo() { int current = x; x =&e...