I have a 3 level nested arrayList as follows:
ArrayList<String> rowContents = new ArrayList();
ArrayList<ArrayList<String>> rows;
ArrayList<ArrayList<ArrayList<String>>> page;
In the code, within different loops, the arrayLists will be populated as follows:
rowContents.add("some content");
rows.add(rowContents);
page.add(rows);
Is it okay to use 3 level nested arrayLists like this? Or, is there a better approach?
ArrayLists, it might be a sign of a bad design.