With checked exceptions, you must either catch them, or explicitly specify that the method inside which the exception might be thrown, passes it on the the calling method, by using a throws clause in the method declaration.
For example, if you have a method that throws a checked exception such as IOException:
This will not compile, because the method does not catch the exception, and it also doesn't have a throws clause. You have to fix it, for example like this:
Campbell Ritchie wrote:I am getting déjà vu. Is that the same website we told you to avoid recently?
Wow. Awful indeed. His two main points on that page, "By rule, unchecked/checked exceptions are/are not propagated," are nonsense. The rules for propagation are exactly the same for every exception: If it's not caught, it bubbles up to the next nearest enclosing try block. That's the runtime behavior of every exception. The compile-time catch-or-declare rule for checked exceptions is a separate issue from that.