wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes exception hierarchy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "exception hierarchy" Watch "exception hierarchy" New topic
Author

exception hierarchy

pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
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 .


:d
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
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
SCJP 1.4, SCWCD in process
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
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

Joined: Jan 12, 2005
Posts: 213
And what about RunTimeException & CompileTimeException .
thanks in advance .
pooja .
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
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.
 
subject: exception hierarchy