EXCEPTIONS
The Classes
Exception
and
RuntimeException
11.5.1
ArithmeticException
: An exceptional arithmetic situation has arisen, such
as an integer division ( 15.16.2) operation with a zero divisor.
ArrayStoreException
: An attempt has been made to store into an array
component a value whose class is not assignment compatible with the compo
nent type of the array ( 10.10, 15.25.1).
ClassCastException
: An attempt has been made to cast ( 5.4, 15.15) a
reference to an object to an inappropriate type.
IllegalArgumentException
: A method was passed an invalid or inappro
priate argument or invoked on an inappropriate object. Subclasses of this class
include:
N
IllegalThreadStateException:
A thread was not in an appropriate
state for a requested operation.
N
NumberFormatException
: An attempt was made to convert a
String
to a
value of a numeric type, but the
String
did not have an appropriate format.
IllegalMonitorStateException
: A thread has attempted to wait on
( 20.1.6, 20.1.7, 20.1.8) or notify ( 20.1.9, 20.1.10) other threads waiting
on an object that it has not locked.
IndexOutOfBoundsException
: Either an index of some sort (such as to an
array, a string, or a vector) or a subrange, specified either by two index values
or by an index and a length, was out of range.
NegativeArraySizeException
: An attempt was made to create an array
with a negative length ( 15.9).
NullPointerException
: An attempt was made to use a null reference in a
case where an object reference was required.
SecurityException
: A security violation was detected ( 20.17).
Package
java.util
defines the following additional standard unchecked runtime
exceptions:
java.util.EmptyStackException
: An attempt was made to access an ele
ment of an empty stack.
java.util.NoSuchElementException
: An attempt was made to access an
element of an empty vector.
209
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved