A

Admin • 828.03K Points
Coach

Q. 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");
}

  • (A) 1
  • (B) 3
  • (C) 2 3
  • (D) 2 3 D. 1 3
  • Correct Answer - Option(D)
  • Views: 14
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.