單項(xiàng)選擇題

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.

題目列表

你可能感興趣的試題

微信掃碼免費(fèi)搜題