• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception hierarchy

 
pooja jain
greenhorn
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the exception hierarchy :



my doubts are :
1] how this Error is different than other programming error .
2] where comes UncheckedException & CheckedException in this heirarchy .

thanks in advance .
pooja .
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RuntimeException extends Exception

The checked exceptions are the classes that are subclasses of Exception and are not subclasses of RuntimeException. All other subclasses of Throwable are the unchecked exceptions
[ January 15, 2005: Message edited by: Mike Gershman ]
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general, the subclasses of RuntimeException are programmer errors and the subclasses of Error are system errors. But this is not always true. For example, AssertionError is a subclass or Error.
[ January 15, 2005: Message edited by: Mike Gershman ]
 
pooja jain
greenhorn
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what about RunTimeException & CompileTimeException .
thanks in advance .
pooja .
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what about RunTimeException & CompileTimeException.

I should have said RuntimeException before - I corrected the error above.

I can't find a class called CompileTimeException in the API. Where did you see it?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic