Eu tenho isso:
List<ArrayList<Integer>> listaDeFora = new ArrayList<ArrayList<Integer>>();
Como faço para exibir no console os Integers que estão dentro do ArrayList que por sua vez está dentro de outro ArrayList?
Obrigado!
Eu tenho isso:
List<ArrayList<Integer>> listaDeFora = new ArrayList<ArrayList<Integer>>();
Como faço para exibir no console os Integers que estão dentro do ArrayList que por sua vez está dentro de outro ArrayList?
Obrigado!
Já descobri.
System.out.println("" + listaDeFora.get(0));
hehehe
for (ArrayList<Integer> listaDeDentro : listaDeFora) {
for (Integer dado : listaDeDentro) {
System.out.print(dado + " ");
}
System.out.println();
}