http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html
Here's a quick overview of exceptions:
The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.
> checked exception is more fashionable
> cause nobody has checked unchecked exception in his
> code so it has no fashion sense. Hence checked
> exception has more fashion sense then unchecked
> exception.
That's a somewhat circular argument!
Because of the broken stylus, the album was ruined
Because the album was ruined, the stash wasn't rolled on it
Because the stash wasn't rolled, the pigs found it
Because the pigs took our stash, we got busted and fined
Because of the fine, we couldn't replace the stylus
Because of the broken stylus, the album was ruined...