black

SCJP程序员认证考试

登录

单项选择题

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

A. ABCD
B. Compilation fails.
C. C is printed before exiting with an error message.
D. BC is printed before exiting with an error message.
E. BCD is printed before exiting with an error message.

相关考题

多项选择题 public class X {  public X aMethod() { return this;}  }  public class Y extends X {  }  Which two methods can be added to the definition of class Y?()

单项选择题 Whichfragmentisanexampleofinappropriateuseofassertions?()

单项选择题 int i = 1,j = 10;  do{  if (i>j) {  continue;  }  j--;  } while (++i <6);  System.out.println(“i = “ +i+” and j = “+j);  What is the result?()

All Rights Reserved 版权所有©求知题库网库(csqiuzhi.com)

备案号:湘ICP备14005140号-1

经营许可证号:湘B2-20140064