2 Replies Latest reply: Apr 25, 2009 3:41 PM by 807588 RSS

    copying an array of linked lists

      I have this:
      ArrayList pathArray[] = new ArrayList[20];
      ArrayList copyRow = pathArray[0];
      pathArray[1] = copyRow;
      The bottom bit of the above code after the .... doesnt seem to do what i want, I am trying to copy the contents of array index 0 to array index 1. Now when i do that it works but if i start editing the variables in it it changes the variables in index 0, whats the correct way of copying?