ArrayList dentro de ArrayList

2 respostas
Fyowti

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!

2 Respostas

Fyowti

Já descobri.

System.out.println("" + listaDeFora.get(0));

hehehe

ViniGodoy

for (ArrayList&lt;Integer&gt; listaDeDentro : listaDeFora) { for (Integer dado : listaDeDentro) { System.out.print(dado + " "); } System.out.println(); }

Criado 14 de abril de 2012
Ultima resposta 15 de abr. de 2012
Respostas 2
Participantes 2