This error occurs in the following code:

public class example {

public static void main(String[] args) {

ArrayList list = new ArrayList();

for (int i = 0; i < 4; i++)
{
list.add (new Integer (i*i));
System.out.println (list.get(i));
}

}
}

Does anyone have any suggestions how to print the elements in the arraylist? The error I get is

"cannot resolve symbol class ArrayList"

TIA