• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Doubt in Exceptions

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RuntimeException, Error, and their subclasses are unchecked. All other exceptions are checked.
 
Lavanya Raguram
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic