可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

static void test() thr


static void test() throws Error {  if (true) throw new AssertionError();  System.out.print(”test “);  }  public static void main(String[] args) {  try { test(); }  catch (Exception ex) { System.out.print(”exception “); }  System.out.print(”elld “);  }  What is the result?() 

  • A end
  • B Compilation fails.
  • C exception end
  • D exception test end
  • E A Throwable is thrown by main.
  • F An Exception is thrown by main.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、public static void mai

public static void main(String[] args) { String str = null‟; if (str == null) {&ensp...

2、public static void par

public static void parse(String str) { try { float f= Float.parseFloat(str); } catch (NumberFo...

3、11. public static void

11. public static void main(String[] args) { 12. Integer i = uew Integer(1) + new Inte...

4、11. public static void

11. public static void test(String str) { 12. if(str == null  str.lellgth() == 0) {&...

5、static void test() thr

static void test() throws RuntimeException { try { System.out.print(test ); throw new RuntimeExcepti...

6、public static void tes

public static void test(String str) {int check = 4; if (check = str.length()) { System.o...