So I have looked a lot online on how to do this and what I get is this
ArrayList<ArrayList<Type>> arrayLists = new ArrayList<ArrayList<Type>>();
ArrayList<TypeA> typeA = new ArrayList<TypeA>();
ArrayList<TypeB> typeB = new ArrayList<TypeB>();
...
Assuming that I have a class called TypeA, and a class called TypeB, and the array list typeA would contain multiple objects of the class TypeA. The same goes for typeB
Now my question what do I put where Type is for the arrayList, and how do I add an arrayList to arrayLists? If I did this I would get an error:
arrayLists.add(typeA);
I am trying to make a list that contains arrayLists, if my approach is wrong please tell me.