Accessing elements of an ArrayList which contains 2D arrays
I have a problem which can be described as follows :
First, I have a list of 2D String arrays :
Now, I create an ArrayList and store all these 2D String arrays in it :
String s1 = new String[size][size];
String s2 = new String[size][size];
Now What I want to do is to display contents of each 2D String arrays when I increment or decrement the index of the ArrayList myList.
ArrayList<String> myList = new ArrayList<String>();
I was confused because the elements of the ArrayList are 2D arrays. Can you give me a solution for this or Is there any better way to store 2D arrays rather than using ArrayList.
Thanks in advance!