I want to create an array that contains ArrayList
I\'ve tried
ArrayList name[] = new ArrayList()[];
If you do want an array of ArrayList, you'll have to initialise each position of the array individually:
int size = 9; // 9 is just an example
// you can remove the annotation, but you'll be warned:
// Type safety: The expression of type ArrayList[] needs unchecked conversion
// to conform to ArrayList[]
@SuppressWarnings("unchecked")
ArrayList name[] = new ArrayList[ size];
for( int i = 0; i < size; i++) {
name[ i] = new ArrayList();
}