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:

Verified
Correct Answer:
Verified
Q8: When an exception is thrown:<br>A) it must
Q9: A class must implement the Serializable interface
Q10: In a catch statement, what does the
Q11: When an exception is thrown by code
Q12: What will be the result of the
Q15: All exceptions are instances of classes that
Q16: The following catch statement can: catch (Exception
Q17: Unchecked exceptions are those that inherit from:<br>A)
Q18: All of the exceptions that you will
Q57: The try statement may have an optional