black

SCJP程序员认证考试

登录

单项选择题

public class X { 
public static void main(String [] args) { 
try { 
badMethod(); 
System.out.print(“A”); 
} 
catch (Exception ex) { 
System.out.print(“B”); 
} 
finally { 
System.out.print(“C”); 
} 
System.out.print(“D”); 
} 
public static void badMethod() { 
throw new RuntimeException(); 
} 
} 
What is the result? () 

A. AB
B. BC
C. ABC
D. BCD
E. Compilation fails.

相关考题

多项选择题 WhichtwoallowtheclassThingtobeinstantiatedusingnewThing()?

多项选择题 Whichtwoarevaliddeclarationswithinaninterfacedefinition?()

单项选择题 public class X {  public static void main(String [] args) {  try {  badMethod();  System.out.print(“A”); }  catch (Exception ex) {  System.out.print(“B”);  }  finally {  System.out.print(“C”);  }  System.out.print(“D”);  }   public static void badMethod() {} }  What is the result?()

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

备案号:湘ICP备2022003000号-2