Exception Handling
© examsiri.com
Question : 7 of 24
Marks:
+1,
-0
Given:
What is the result?
1. public static void main(String[] args) {
2.   try {
3.    args = null;
4.    args[0] = "test";
5.    System.out.println(args[0]);
6.   } catch (Exception ex) {
7.    System.out.println("Exception");
8.   } catch (NullPointerException npe) {
9.    System.out.println("NullPointerException");
10.   }
11. }What is the result?
Go to Question: