• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Checked Exceptions

 
md ali
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can anyone please tell me that what is meant by the term checked exceptions. And what is meant by term unchecked exceptions.
Thanks & Reagrds
Muhammad Ali
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unchecked Exceptions are all Exceptions that are subclassing RuntimeException, i.e. RuntimeException and all its subclasses.
Checked Exceptions are all subclasses of Exception except the RuntimeException branch of the hierarchy.
Val
 
Roopa Bagur
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checked exception are subclasses of Exception & has to be handled in your code in a try catch block or should be thrown using throws clause else the compiler will complain. Whereas unchecked exceptions being subclass of RuntimeException need not have to be handled in your code. They will be thrown during runtime.
Hope this helps.
Originally posted by md ali:
Hi All,
Can anyone please tell me that what is meant by the term checked exceptions. And what is meant by term unchecked exceptions.
Thanks & Reagrds
Muhammad Ali

 
md ali
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou for your prompt replies and help.
Regards
Muhammad Ali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic