Recuperar arrayList dentro de outro

1 resposta
S

Olá
Tenho 3 arraylist sendo dois dentro de um

ArrayList ListaGeral = new ArrayList();

ArrayList Lista1 = new ArrayList();

ArrayList Lista2 = new ArrayList();

ListaGeral.add(Lista1);
ListaGeral.add(Lista2);

Agora eu gostaria de recuperar um por um, como faria isso?

Grato

1 Resposta

T
Lista1 = (ArrayList) ListaGeral.get(0);
Lista2 = (ArrayList) ListaGeral.get(1);

Só para lhe encher o saco. Não comece nomes de variáveis por maiúsculas, afinal de contas Java != C#

Criado 26 de janeiro de 2007
Ultima resposta 26 de jan. de 2007
Respostas 1
Participantes 2