I want to be able to achieve some sort of class or variable that can store possibly many ArrayLists inside using Java.
For example, a two dimensional ArrayList would be like this: ArrayList<ArrayList<Data_type>>.
A three dimensional ArrayList is like this ArrayList<ArrayList<ArrayList<Data_type>>>.
And so on for any N sized ArrayList.
I want to implement a function that can take any N sized arraylist as a parameter, and I'm not quite so sure how to implement this and how the function signature would look like. I'm currently trying to use Generics which I have used in the past, but in this situation I'm a little lost.
Any suggestions?