I would like to create an array of ArrayList<String>. I tried the following:
static ArrayList<String>[] displayBlocks = new ArrayList<String>[3];
However, I’m getting a compile time error:
generic array creation
I have added import java.util.*;. How can I get it to compile?
if you want an array of arraylist:
Here is a related post. you cant create a generic array of arraylist.
You can do this: