Enter the numerator:
Rats
If the division didn't work, you entered bad data.
Exception in thread "main" java.lang.NumberFormatException: Rats
at java.lang.Integer.parseInt(Integer.java:409)
at java.lang.Integer.parseInt(Integer.java:458)
at FinallyPractice.main(FinallyPractice.java:16)
A good answer might be:
The try{} block threw a NumberFormatException,
but there was no catch{} block for it.
So: (1) the finally block executed, and then
(2) the execption was thrown to the caller (in this case the Java run time system),
which (3) printed the last four lines.
|