Solved

What Will the Following Code Display

Question 13

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) 99
B) 997
C) 0
D) 1

Correct Answer:

verifed

Verified

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

Related Questions