try { int x = Integer.parseInt("two"); } Which could be used to create an appropriate catch block?

try { int x = Integer.parseInt("two"); } Which could be used to create an appropriate catch block? Correct Answer NumberFormatException

  C) NumberFormatException

C is correct. 'Integer.parseInt' can throw a NumberFormatException, and IllegalArgumentException is its superclass 

Related Questions

Comment on the following 2 C programs.
#include  //Program 1int main(){ int a; int b; int c;}#include  //Program 2int main(){ int a; { int b; } { int c; }}