This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "exceptions" Watch "exceptions" New topic


anita dhar
Ranch Hand

Joined: Jul 14, 2007
Posts: 69
what is checked and unchecked exception example for checked and unchecked
dave zebatinsky

Joined: Jul 07, 2007
Posts: 6
Hi Aneea,

Checked exceptions that have a direct superclass of Exception are those that need to be listed in a method's throws clause, whereas unchecked exceptions that have a superclass of RuntimeException do not need to be listed as they can be thrown from almost any method.

a checked exception can be IOException for example, and an unchecked exception can be illegalStateException for example.


Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Not an advanced question. Moving...

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: exceptions
It's not a secret anymore!