alt
Advertisement
Sponsored links
Certification Series
Online Training
Career Series
Exforsys
Exforsys arrow Certification Series arrow SCJP arrow SCJP 5 : Chapter 2. Flow Control (Part-4)
Site Search


SCJP 5 : Chapter 2. Flow Control (Part-4)

SCJP 5 : Chapter 2. Flow Control (Part-4)

Recognize the effect of an exception arising at a specified point in a code fragment. Note that the exception may be a runtime exception, a checked exception, or an error.

Error

An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it.

A method is not required to declare in its throws clause any subclasses of Error that might be thrown during the execution of the method but not caught, since these errors are abnormal conditions that should never occur.

.....
java.lang.Object
.....
.....java.lang.Throwable
.....
..........java.lang.Error

.....

Exception

The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.

.....
java.lang.Object
.....
.....java.lang.Throwable
.....
..........java.lang.Exception

.....

RuntimeException

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.

A method is not required to declare in its throws clause any subclasses of RuntimeException that might be thrown during the execution of the method but not caught.

.....
java.lang.Object
.....
.....
java.lang.Throwable
.....
..........java.lang.Exception
.....
...............java.lang.RuntimeException

.....

______________

Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.


Trackback(0)
Comments (0)add comment

Write comment

busy
 
< Prev   Next >
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape