-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.2, 1.3.0
-
generic
-
generic
Name: skT88420 Date: 10/25/99
D:\jdk\Documentation\api\java\lang\reflect\Array.html
newInstance
public static Object newInstance(Class componentType,
int length)
throws NegativeArraySizeException
Creates a new array with the specified component type and length. Invoking this method is equivalent to creating an array as follows:
int[] x = {length];
Array.newInstance[componentType, x];
but { length ] doesnt work
only {length} works
(Review ID: 96960)
======================================================================
Name: krT82822 Date: 01/01/2000
(typo still exists in kestrel-beta docs)
Typo: " int[] x = {length];"
in the API there is an error.
in the page:
java.lang.reflect
Class Array
java.lang.Object
|
+--java.lang.reflect.Array
it prints
newInstance
public static Object newInstance(Class componentType,
int length)
throws NegativeArraySizeException
Creates a new array with the specified component type and length. Invoking this
method is equivalent to creating an array as follows:
int[] x = {length];
Array.newInstance[componentType, x];
if you noticed, you decalred the array with {length]
oops?!??!?!!?!!??!
(Review ID: 99481)
======================================================================
- duplicates
-
JDK-4272093 Doc For Class Array method newArray - incorrect line of code.
- Resolved