B
baobao
I want to create an array of ArrayLists which contain Strings, like this:
ArrayList<String>[] asdf = new ArrayList<String>[5];
However, whenever I try this I get compile error: generic array creation.
Why is this array generic? It seems everything is quite explicit here. Could
someone please explain to me what is going on here. Thanks in advance!
ArrayList<String>[] asdf = new ArrayList<String>[5];
However, whenever I try this I get compile error: generic array creation.
Why is this array generic? It seems everything is quite explicit here. Could
someone please explain to me what is going on here. Thanks in advance!