Q:

Exception hierarchy in java

As Error and Exception are subclass of throwable class, we can throw any error, runtime ex and other ex. Also we can catch any of these type.
Why do we usually catch only checked Exception?
Can somebody provide me good links for exception with examples?

A:

The whole point of a checked exception is that you are required to catch it.  It is the type of error that can potentially come up in normal program execution (such as an I/O error), and the application is expected to handle it gracefully.
Conversely, unchecked exceptions are those that should not occur during normal operation of the program (they break the rules in some way), and as such you do not try to handle it since there isn't likely much you can do.

A:

I think your premise that unchecked exceptions are never handled is incorrect. Sure, you should never handle NullPointerException, IndexOutOfBoundsException, etc. since these indicate logic errors in the programming, and so catching them actually hides the fact that there is a bug in the program. However, some APIs have exception hierarchies that are rooted in RuntimeException and, if that is the case, then you may end up catching a whole hell of a lot of those in your application; in fact, I previously developed a GUI application, where a huge number of different exceptions that inherited from RuntimeException needed to be handled, and this API happened to be used more than any of the APIs in the Java language that throw checked exceptions, and so it was actually the opposite in that case.
That said, if there is something that absolutely does need to be handled, by convention, these are made into checked exceptions (inheriting from Exception instead of RuntimeException). Also, the compiler forces you to handle such an exception or declare it to be thrown (that's what "checked exception" means). So, a combination of convention and requirement is probably why you may be handling more checked than unchecked exceptions (because the ones that are urgent have been made into checked exceptions by convention, or you are ignoring important unchecked exceptions, because you're not forced to handle them).

