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.
正确答案:E
答案解析:有
微信扫一扫手机做题