I have the following:
ArrayList<int[]> lista = new ArrayList<int[]>();
int[] posible_mov = new int[2];
posible_mov[0] = 0;
posible_mov[1] = 0;
lista.add(posible_mov);
posible_mov[0] = 1;
posible_mov[1] = 1;
lista.add(posible_mov);
Well, if I walk the show with arraylist and get all elements method, shows me in both cases:
lista.get(0) => 1, 1 lista.get(1) => 1, 1
WHY?