black

SCJP程序员认证考试

登录

单项选择题

public class Test { 
public static void aMethod() throws Exception { 
try { 
throw new Exception();
} finally { 
System.out.println(“finally”); 
} 
} 
public static void main(String args[]) { 
try { 
aMethod(); 
} catch (Exception e) { 
System.out.println(“exception”); 
} 
System.out.println(“finished”); 
} 
} 
What is the result?()  

A. finally
B. exception finished
C. finally exception finished
D. Compilation fails.

相关考题

单项选择题 int x = 3;  int y = 1;  if (x = y) {  System.out.println(“x = “ + x);  }  What is the result? ()

单项选择题 Youwantaclasstohaveaccesstomembersofanotherclassinthesamepackage.Whichisthemostrestrictiveaccessthataccomplishesthisobjective?()

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

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

备案号:湘ICP备2022003000号-2