please help meto add integer in the ArrayList inside an ArrayList.. Here is the code..
ArrayList<ArrayList<Integer>> player = new ArrayList<ArrayList<Integer>>(10);
ArrayList<Integer> array = new ArrayList<Integer>(10);
array.add(1);
array.add(2);
array.add(3);
array.add(4);
array.add(5);
player.add(array);
player.add(array);
If i check what's inside array and player using debug..
array[1,2,3,4,5]
player[[1,2,3,4,5],[1,2,3,4,5]]
Now, i want to add Integer on player's ArrayList slot 0 using this:
player.get(0).add(6);
but instead of getting of this:
player[[1,2,3,4,5,6],[1,2,3,4,5]]
i got this:
player[[1,2,3,4,5,6],[1,2,3,4,5,6]]
In short, player's ArrayLost slot 0 and slot 1 received the integer that i'ved add..
Please help.. Thanks in advance.. :)