|
Written by Asif
|
|
Friday, 09 March 2007 |
|
What are Checked and Unchecked exceptions in java? In todays Tech question of the day we deal with the basic question of Exception handling in Java.
Java defines two kinds of exceptions: · Checked exceptions: Exceptions that inherit from the Exception class are checked exceptions. Client code has to handle the checked exceptions thrown by the API, either in a catch clause or by forwarding it outward with the throws clause. · Unchecked exceptions: RuntimeException also extends from Exception. However, all of the exceptions that inherit from RuntimeException get special treatment. There is no requirement for the client code to deal with them, and hence they are called unchecked exceptions.  Exception |
|
Last Updated ( Wednesday, 14 March 2007 )
|