|
(Review: ) What must your code do with a checked exception? A good answer might be:
|
Passing the BuckIf a method throws a checked exception back to its caller, the caller must do one of the same two things. And if the caller throws the exception to its caller, then its caller must do the same two things, and so on. Ultimately the exception will be handled, possibly by the runtime system (which terminates the program and prints the stack trace.) Here is an outline of some code:
Every method in this example throws IOExceptions back to its caller.
Since it is the Java run time system that called |
QUESTION 7:
If an IOException occured in |