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.

相关考题

单项选择题 1.public class Test {  2.public static void main (String args[]) {  3.class Foo {  4.public int i = 3;  5.}  6.Object o = (Object) new Foo();  7.Foo foo = (Foo)o;  8.System.out.printIn(foo. i); 9. }  10.}   What is the result?()

多项选择题 Whichtwodeclarationspreventtheoverridingofamethod?()

多项选择题 public class OuterClass {  private double d1  1.0;  //insert code here   }   You need to insert an inner class declaration at line2. Which two inner class declarations are valid?()

All Rights Reserved 版权所有©建筑考试题库(jzkao.com)

备案号:湘ICP备2020024380号-3