ExamVeda
Login
Home
This question belongs to Java Program Exceptions
Exceptions
?

What will be the result if NullPointerException occurs at line 2?
try{
     //some code goes here
}
catch(NullPointerException ne){
     System.out.print("1 ");
}
catch(RuntimeException re){
     System.out.print("2 ");
}
finally{
     System.out.print("3");
}

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Mahesh Babu
Mahesh Babu 9 years ago
some code goes here how to blindly analyze....