What's the difference between the following statements:
List<E>[] x = (List<E>[]) new List[100]; and
List<E>[] x = new List[100]; In my script it's noted that the former would be a correct way to create an array of generics (although it leads to a compiler warning). But I can't quite figure out what's the use of the (List<E>[]) statement. List<E>[] isn't even it's own type, and the compiler will simply replace it with (List[]), so you'd get
List<E>[] x = (List[]) new List[100]; a conversion from List[] to List[], which is useless. So why put in a (List<E>[]) in the first place?