Q:

Arrays of arraylists in java related to infer generic type arguments suggestion in eclipse

This question is regarding arrays of arraylist.
When I write the code similar to this in eclipse, the eclipse gave suggestions on 
a) Infer generic type arguments
b) supress warnings and allow this part of the code to be unchecked.
ArrayList<Integer> [] test = new ArrayList[];

In my code, I need to iterate over the arraylist and pick the numbers and I want the numbers to behave as ints always. So, do I have to get the intValue from Integer objects, in order for the code to work well. 
Is this a good idea to use arrays of arrayList. 
I suppressed the warning and sometimes, the code works well, and sometimes I think some problem which is difficult to identify.
So, what I want to know is 
a) if there is any better way to do this?
b) Is this way always prone to errors?

A:

It is better to use List of ArrayLists rather than arrays of arrayLists as we have to provide size for the arrays while defining.
List<ArrayList<Integer>> test=new ArrayList<ArrayList<Integer>>();

If you want primitive int values , yes use intValue() method.

