Please consider the following code:
public class A<T> {
public void main(String[] args) {
A<String>[] array = new A<String>[10];
System.out.println(array.length);
}
}
I am trying to define (and allocate space for it) an array of 10 elements where each element of the array is of type A. I thought the above code would do it, but it fails to compile.
Thanks, Bob