| Author |
How to classify an exception as checked or unchecked?
|
Ajay Xavier
Ranch Hand
Joined: Jan 03, 2005
Posts: 109
|
|
Hi, Thanks for every one who gave their veiws on my last query.(Throwing a null value from a method) How to classify an exception as a checked one or unchecked one? To be more precise how do i decide the superclass (Exception or RuntimeException) of my custom exception? Thanks, Ajay.
|
 |
Chetan Raju
Ranch Hand
Joined: Aug 02, 2006
Posts: 109
|
|
All exception classes that extend the RuntimeException class are said to be unchecked exceptions. This means the compiler doesn't check the RuntimeExceptions. So if you want to create a checked exception then extend your class with Exception class. Also, the Error class and subclasses of Error are also unchecked by compiler.
|
 |
 |
|
|
subject: How to classify an exception as checked or unchecked?
|
|
|