Examlex

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) ;


Definitions:

Preceding Activity

An action or task that must be completed before another specific activity or task can commence.

Related Questions