black

SCJP程序员认证考试

登录

单项选择题

public class ExceptionTest {  
class TestException extends Exception {}  
public void runTest () throws TestException {}  
public void test () /* Point X*/ {  
runTest ();  
}  
}  
At point X on line 4, which code can be added to make the code compile?()  

A. Throws Exception.
B. Catch (Exception e).
C. Throws RuntimeException.
D. Catch (TestException e).
E. No code is necessary.

相关考题

多项选择题 Whichtwocreateaninstanceofanarray?()

单项选择题 public class Test {   public static void main (String args) {   class Foo {   public int i = 3;  }   Object o = (Object) new Foo();   Foo foo = (Foo)o;   System.out.printIn(foo. i);  }   }   What is the result?()

多项选择题 Whichtwodeclarationspreventtheoverridingofamethod?()

All Rights Reserved 版权所有©财会考试题库(ckkao.com)

备案号:湘ICP备2022003000号-2