-
Type:
Bug
-
Resolution: Not an Issue
-
Priority:
P4
-
None
-
Affects Version/s: 1.0
-
Component/s: core-libs
-
sparc
-
solaris_2.4
If you create an array of Integer, getClass().getSuperClass() returns Object's class
object. But if you ask if that array is an instanceof Number[], the answer is true.
The second answer makes the most sense, since an Integer[] object acts as if it
extends Number[]. It would seem that getSuperClass() of an array object should
return a class object for an array of the element's superclass, and not return Object.
object. But if you ask if that array is an instanceof Number[], the answer is true.
The second answer makes the most sense, since an Integer[] object acts as if it
extends Number[]. It would seem that getSuperClass() of an array object should
return a class object for an array of the element's superclass, and not return Object.