JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... array before the superclass constructor runs. This is a problem ... code generation error in JDK 1.1.7B compiler. It appears that non ...
Feb 5, 1997 ... ... array before the superclass constructor runs. This is a problem ... code generation error in JDK 1.1.7B compiler. It appears that non ...
GenericTest.java:6: error: array required, but CAP#1 found return foo.call()[0]Relevant spec text from 15.10.3 in JLS 8: "The type of the array reference expression must be an array type (call it T[], an array whose components are of type T), or a compile-time error occurs."
JDK-6361355 : java.lang.reflect.Array.newInstance() does not allow "run time type tokens".For example, if you have "Class<T> klass", then you can create an instance "T instane = klass.newInstance()". However, this does not apply to arrays.
When run with Java 1.6_21 the code works fine regardless of the access specifier of arr. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The console should readOverride public String toString() {. return Arrays.toString(arr)
Sub-Component: javac. Affected Version: 6. Priority: P3. Status: Closed. Resolution: Fixed.Description. See the constructor start position in the following example