I want to create an array that contains ArrayList
I\'ve tried
ArrayList name[] = new ArrayList()[];
I have tried this without an error, even though I have putted a limit in the array less than the amount of items added:
package Testes.src;
import java.util.ArrayList;
import java.util.List;
public class Testes {
private List name=new ArrayList(1);
public Testes(){
for (int i = 1; i <= 100; i++) {
name.add("Teste"+Integer.toString(i));
}
for (int i = 0; i < name.size(); i++) {
System.out.println(name.get(i));
}
}
public static void main(String [] args)
{
Testes t1=new Testes();
}
}