black

SCJP程序员认证考试

登录

单项选择题

try { 
int x = 0; 
int y = 5 / x; 
} catch (Exception e) { 
System.out.println(“Exception”); 
} catch (ArithmeticException ae) { 
System.out.println(“Arithmetic Exception”); 
} 
System.out.println(“finished”); 
What is the result?()  

A. finished
B. Exception
C. Compilation fails.
D. Arithmetic Exception

相关考题

单项选择题 int i = 0;  while (true) { if(i==4) {  break;  }  ++i;  }  System.out.println(“i=”+i);  What is the result?()

单项选择题 1. public class Exception Test {  2. class TestException extends Exception {}  3. public void runTest() throws TestException {}  4. public void test() /* Point X */ {  5. runTest();  6. }  7. }  At Point X on line 4, which code is necessary to make the code compile?()

单项选择题 12. void start() {  13. A a = new A();  14. B b = new B();  15. a.s(b);  16. b = null;  17. a = null;  18. System.out.println(“start completed”); 19. }  When is the B object, created in line 14, eligible for garbage collection?()

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064