Solved

What Will the Following Code Display? String Input = "99#7";

Question 28

Multiple Choice

What will the following code display? String input = "99#7";
Int number;
Try
{
Number = Integer.parseInt(input) ;
}
Catch(NumberFormatException ex)
{
Number = 0;
}
Catch(RuntimeException ex)
{
Number = 1;
}
Catch(Exception ex)
{
Number = -1;
}
System.out.println(number) ;


A) -1
B) 0
C) 1
D) 99

Correct Answer:

verifed

Verified

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

Related Questions