자격증/OCJP_ExamB
QUESTION 57
IT grow.
2018. 7. 13. 21:45
반응형
QUESTION 57Given: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 endB. Compilation fails.C. test runtime endD. test exception endE. A Throwable is thrown by main at runtime.Solution : D
반응형