Exception Handling
© examsiri.com
Question : 9 of 24
Marks:
+1,
-0
Given:
What is the result?
1. static void test() throws RuntimeException {
2.   try {
3.    System.out.print("test ");
4.    throw new RuntimeException();
5.   }
6.   catch (Exception ex) { System.out.print("exception "); }
7. }
8. public static void main(String[] args) {
9.   try { test(); }
10.   catch (RuntimeException ex) { System.out.print("runtime "); }
11.   System.out.print("end ");
12. }What is the result?
Go to Question: