Multiple Choice
int number;
Boolean done = false;do
{
Try
{
System.out.print("Enter an integer: ") ;
Number = console.nextInt() ;
System.out.println() ;
Done = true;
System.out.println("number = " + number) ;
}
Catch (InputMismatchException imeRef)
{
Str = console.next() ;
System.out.println("Exception "
+ imeRef.toString()
+ " " + str) ;
}
}
While (!done) ;What is the most likely type of exception in the code in the accompanying figure?
A) IllegalArgumentException
B) InputMismatchException
C) FileNotFoundException
D) NumberFormatException
Correct Answer:

Verified
Correct Answer:
Verified
Q3: NoSuchElementException is a method of the class
Q5: If you have created an exception class,
Q20: If you want to provide your own
Q21: To handle window events, if the class
Q29: int number;<br>Boolean done = false;do<br>{<br>Try<br>{<br>System.out.print("Enter an integer:
Q33: When an exception occurs, an object of
Q35: How many finally blocks can there be
Q41: If a negative value is used for
Q42: When is a finally block executed?<br>A) Only
Q47: The class Exception contains two constructors.