This discussion is archived
11 Replies Latest reply: Jul 15, 2008 9:57 AM by 807589 RSS

How to create an array of ArrayLists?

807589 Newbie
Currently Being Moderated
Hello,

I'm trying to compile the following code:
ArrayList<Object> arr[];
arr = new ArrayList<Object>()[size];
in order to create an array of ArrayLists. I'm being met with the following compilation error:

The type of this expression must be an array type but it resolved to ArrayList<Object>

Can anyone show me how to correctly do this?

Thanks