• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what r checked and unchecked exceptions

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
as far as i know checked exceptions r those foe which the compiler inforces check during compilation.
can some body get me a list of all commonly occured checked and unchecked exception?
i want some one to throw light on checked exception as well.
thanks in advance,
sunil.s
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure all the subclasses of RunTimeException are unchecked . But I'm not completely sure all other exceptions are checked by the compiler. But one thing that makes me almost sure about the above statement is that to avoid compiler error, we have to "throws"(literally) all exceptions except RuntimeException in the method signature if we don't catch them.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All exceptions are checked UNLESS they inherit from RuntimeException. Browsing in the HTML docs that come with the JDK will let you discover all of the standard descendents of RuntimeException.
Bill
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some of the familiar Unchecked Exceptions are
NullPointerException
ArithmeticException
ArrayIndexOutOfBoundsException
ClassCastException
But Strangely NumberFormatException is a UncheckedException
reply
    Bookmark Topic Watch Topic
  • New Topic