11 Replies Latest reply on Jul 15, 2008 9:37 PM by 807589

    How to create an array of ArrayLists?


      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?