Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

checked and unchecked exceptions  RSS feed

 
divi vetriselvan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,
i am not clear about checked and unchecked exceptions.i need clear explanation .
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Divi.
I'm going to move this to our beginner's forum.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checked exceptions:

Exceptions that extend java.lang.Exception (but don't also extend java.lang.RuntimeException). These must be handled at compile time, via a try/catch block or a throws statement. Typically they are used when you have some code that can fail with a reason the client needs to know about.

Unchecked Exceptions:

Exceptions that extend java.lang.RuntimeException. These are not checked at compile time and are usually used to represent exceptional circumstance that are recoverable.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!