This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Doubt in Exceptions

 
Greenhorn
Posts: 27
  • 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.
 
Ranch Hand
Posts: 2410
  • 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
  • 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: 2410
  • 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.
 
Ranch Hand
Posts: 163
  • 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 ]
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!