题目内容:
publicclassX{publicstaticvoidmain(String[]args){try{badMethod();System.out.print(A”);}catch(Exceptionex){System.out.print(C”);}finally{System.out.print(B”);}System.out.print(D”);}publicstaticvoidbadMethod(){thrownewError();}}Whatistheresult?()A.ABCD
B.Compilationfails.
C.Cisprintedbeforeexitingwithanerrormessage.
D.BCisprintedbeforeexitingwithanerrormessage.
E.BCDisprintedbeforeexitingwithanerrormessage.
参考答案: