Thats probably a simple question but I cant figure out the answer to it. If I try intitialize an array of Lists as
List<Integer>[] a = new ArrayList<Integer>[m]
the compliler shows an error "Cannot create a generic array of ArrayList<Integer>" If I write it as
List<Integer>[] a = new ArrayList[m]
then there is obviously a warning "The expression of type ArrayList[] needs unchecked conversion to conform to List<Integer>[]". Not that i am going to die from extra warnings but still I am curious how do I initialize an array of Lists correctly