You are getting this warning because we are not specifying what type of object we will be storing in the array.
Consider the example given below
public class ArrayListTest {
public static void main(){
/* List l = new ArrayList();
l.add("String");
l.add(55); */ /*This code will generate the warning*/
/* How ever if tell in the start what type of object you will store in list you will no get the warning */
List<Object> l = new ArrayList<Object>();
l.add("String");
l.add(55); */
}
}