问题详情

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


A、 test end

B、 Compilation fails.

C、 test runtime end

D、 test exception end

E、 A Throwable is thrown by main at runtime.

时间:2022-01-04 17:18 关键词: SCJP程序员认证考试

答案解析

D
相关问题