Check out example codes for "kotlin 2d arraylist". It will help you in understanding the concepts better.

Code Example 1

val array = Array(row) { IntArray(column) }

Code Example 2

listOfLists.add(new ArrayList<String>());

Code Example 3

List<List<String>> listOfLists = new ArrayList<List<String>>();

Learn ReactJs, React Native from akashmittal.com