Java and JSP Question
View this question.
Add this question to a group or test by clicking the appropriate button below.
public class CatchMe {
public static int getNumber() throws NumberFormatException {
try {
return Integer.parseInt("negative one");
} catch (NumberFormatException nfe) {
return 0;
} finally {
return Integer.parseInt("5");
}
}
public static void main (String args[]) {
System.out.println(getNumber());
}
}
- 0
- NumberFormatException is thrown
- -1
- 5