3
Q:

try { int x = Integer.parseInt("two"); }

Which could be used to create an appropriate catch block?

A) ClassCastException B) IllegalStateException
C) NumberFormatException D) None

Answer:   C) NumberFormatException



Explanation:

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

Subject: Java
Q:

What is the most important feature of Java?

Answer Java is a platform independent language.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 3065