What you are doing wrong :
You have not created an object. Remember that in java
1) All objects have constructors.
2) Constructors are methods.
3) To create an object, you must call the constructor , thus, you are calling a method !
Your desire is ambiguous . But it will be good to read both of these answers :
1) You could make an Array of array lists : This is a data structure with 10 array lists. it is essentially a 2D array where the amount of columns per row is variable, but there will only be 10 rows.
This would be an odd data structure to create. It might represent, for example, a domain model where you have exactly 10 people and each of those people had a variable number of dvds in their dvd collection. so you would have 10 rows, each one with an array list in it.
static ArrayList[] displayBlocks = new ArrayList[10];
- not that there is no () here, just a [] * This is because we havent populated our array, rather, we just declare that there is an array with 10 slots, and each slot will have type "ArrayList". To populate, you would have to iterate and add displayBlock[0]=new ArrayList(), for 0-9.
2) Probably, you just wanted a simple array list , which is a linear collection of items.
To do this you would simply declare :
Collection a = new ArrayList();
//or
List a = new ArrayList();
Now ... you should ask yourself why you can declare the variable as either a Collection or a List, if you want to really java's collections work.