File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Checked and Unchecked Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Checked and Unchecked Exception" Watch "Checked and Unchecked Exception" New topic

Checked and Unchecked Exception

nitin sethi
Ranch Hand

Joined: Jul 14, 2011
Posts: 59

Could anyone confirm if the below is the exact classification for checked and unchecked exception?

1. Throwable (checked)
1.1 Error (unchecked)
1.1.1 unchecked hierarchy
1.2 Exception (checked)
1.2.1 checked hierarchy
1.2.2 RuntimeException (unchecked) unchecked hierarchy
naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

Yes your classification is correct.
In other words

Unchecked Exception = (Error and its subclass Exception + Runtime and its subclass Exception ).

Checked Exception = (Throwable Exception - Unchecked Exception).

Javin Paul
Ranch Hand

Joined: Oct 15, 2010
Posts: 295

In simple words, Any Exception which is sub-class or inherited from RuntimeException is unchecked Exception and doesn't require to be declared on throws clause. rest are checked exceptions.

SQL Query Interview Question java67 Javarevisited
I agree. Here's the link:
subject: Checked and Unchecked Exception
jQuery in Action, 3rd edition