Sail E0 Webinar
Question
What will be the result if NullPointerException occurs at line 2?
1. try{
2. //some code goes here
3. }
4. catch(NullPointerException ne){
5. System.out.print("1 ");
6. }
7. catch(RuntimeException re){
8. System.out.print("2 ");
9. }
10. finally{
11. System.out.print("3");
12. }
Options:
A .  1
B .  3
C .  2 3
D .  1 3
E .  1 2 3
Answer: Option D

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers