how to add new ArrayLists and ADD value to that particular ArrayList
and how to RETRIEVE the data form that list.
ArrayList<ArrayList<Integer>> arrayList=new ArrayList<ArrayList<Integer>>();
ArrayList<Integer> newAL= new ArrayList<Integer>();
arrayList.add(newAL);
newAL.add(1);
newAL.add(2);
newAL.clear();
System.out.println(arrayList.get(0));
//Changes persist in your arraylist
So after adding ArrayList you can manipulate newAL as ArrayList stores reference you don't need to fetch and set element from main arrayList.
To retrive data you can Iterate(Use ForEach Loop) over arrayList or you can do following
Integer List0Item1=arrayList.get(0).get(1);//Get first element of list at 0
arrayList.get(0).set(0, 10);//set 0th element of list at 0 as 10
ArrayList<Integer> list10=arrayList.get(10);//get arraylist at position 10
arrayList.get(index).add(Integer);?