From the java generics tutorial:
List<String> lsa = new List<String>; // not really allowed String s = lsa.get(0); // run-time error - ClassCastException
If arrays of parameterized type were allowed, the example above would compile without any unchecked warnings, and yet fail at run-time."
I have problem understanding why would there be a ClassCastException, because if it were a valid syntax then the individual elements would be of a list of type List<String> and then each element of that can be accessed without any problem.
List<String> list = new ArrayList<String>(); String s = list.get(0);
is allowed so what would be the problem if in the case individual array element was a list type?