I have this array:
ArrayList<ArrayList<Integer>> items = new ArrayList<ArrayList<Integer>>();
I want to create this array on a for cicle and the result must be something like:
[0]: {0 , 0, 0, 3};
[1]: {1 , 2, 3, 3};
[2]: {6 , 2, 5, 4};
During the cicle, new values must be added to the ArrayList in a certain index. The indexcan contains values or not, but they must not be overwriten.
Can i add only arrays to a certain index like items.add(index, array);?
So, how to add more values without overwrite anything?