Solved

Int Number; Boolean Done = False;do

Question 24

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions