ThrowCatch
CSSE 221 – Fundamentals of Software Development Honors
Fall 2008–2009

  1. Use Eclipse to checkout your ThrowCatch project.
  2. Examine the code, predict what is printed when the input is 9, and then run the program to test your prediction. Get help as needed to clear up any confusion if your prediction is wrong.
  3. Repeat the previous step but with each of the following inputs:
  4. Suppose that the code in the finally blocks were important, and suppose that you moved that code to the end of the method, just past the try/catch code. For which of the above inputs would that cause problems? Why?

There is nothing to turn in for this exercise (and no Report), but:

Do you have any questions about how Exceptions are handled?