You declare an array only with [].
LinkedList[] XMLList;
Then you create an instance with a size.
XMLList = new LinkedList[2];
Or both at the same time:
LinkedList[] XMLList = new LinkedList[2];
To add LinkedLists to this array, enter:
XMLList[0] = new LinkedList();
XMLList[1] = new LinkedList();
source
share