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:

Elements

Pure chemical substances consisting of a single type of atom, distinguished by their atomic number, which is the number of protons in their atomic nuclei.

Gold Foil Experiment

An experiment conducted by Ernest Rutherford which demonstrated that the atom has a tiny, dense nucleus by observing the deflection of alpha particles.

Rutherford

A term often referencing Ernest Rutherford, a physicist known for his discoveries in the field of nuclear physics and for the Rutherford model of the atom.

Electron

A negatively charged subatomic particle present in every atom that primarily facilitates the flow of electricity in solid materials.

Related Questions