SCJP2. Please Indent your code using UBB Code
If doing a cast of the R ordinary class to the T ordinary class type, ie: (T)R, then R must be either the same class as T or a subclass of T, or a run-time exception is thrown.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
If T is an array type TC[], that is, an array of components of type TC, then a run-time exception is thrown unless one of the following is true:
# TC and RC are the same primitive type.
# TC and RC are reference types and type RC can be cast to TC by a recursive application of these run-time rules for casting.
If R is an ordinary class (not an array class):
If T is a class type, then R must be either the same class (�4.3.4) as T or a subclass of T, or a run-time exception is thrown.
SCJP2. Please Indent your code using UBB Code
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Whatever doesn't kill us ...<br />Is probably circling back for another try.<br />SCJP 1.4
SCJP2. Please Indent your code using UBB Code
Ron Newman - SCJP 1.2 (100%, 7 August 2002)