Why can’t we create generic array? or write code as List[] array = new ArrayList[10];
it is because Java arrays (unlike generics) contain, at runtime, information about its component type. So you must know the component type when you create the array. Since you don't know what List is at runtime, you can't create the array.