File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Exceptions

 
Lavanya Raguram
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was going thro Exception Handling in K&B book, where they have mentioned that checked exceptions should be either declared or handled but it is not necessary for runtime or error type of exceptions.

But i am not able to classify which r checked n which r unchecked exceptions can anyone pls post the exceptions with their classifications as checked n unchecked or is their any other means to find out if the exception is chekced or not.I am completely confused regding this.
 
Keith Lynn
Ranch Hand
Posts: 2399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RuntimeException, Error, and their subclasses are unchecked. All other exceptions are checked.
 
Lavanya Raguram
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know that runtime,error are unchecked but i dono the names of the exceptions that r checked n unchecked how can i find which exceptions r runtime exceptions or exceptions of type error or they r checked exceptions.

is there any book that specifically lists out the cchecked n unchecked exceptions?
 
Keith Lynn
Ranch Hand
Posts: 2399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if there is an exhaustive list. However, you can you use the API docs and find them.
 
Naresh Gunda
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RuntimeException, Error, and their subclasses are unchecked. All other exceptions are checked.

check Java API

For every class, its super class is given in the API

Suppose for ArithmeticException,



Here ArithmeticException is the subclass of RuntimeException so it is unchecked exception.
[ April 05, 2006: Message edited by: Naresh Kumar ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic