A

Admin • 828.03K Points
Coach

Q. public class Test{
public static void main(String args[]){
try{
int a = Integer.parseInt("four");
}
}
}

Which exception could be handled by the catch block for above?

  • (A) IllegalStateException
  • (B) NumberFormatException
  • (C) ClassCastException
  • (D) ClassCastException D. ArrayIndexOutOfBoundsException
  • Correct Answer - Option(B)
  • Views: 13
  • 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.