I am having the following java code, in which I am trying to copy the ArrayList to another ArrayList.
ArrayList nodes = new ArrayList
Wouldn't it just be a case of:
ArrayList> outer = new ArrayList>(); ArrayList nodeList = new ArrayList(); // Fill in nodeList here... outer.add(nodeList);
Repeat as necesary.
This should return you a list in the format you specified.