It looks like you are looking for ArrayList<ArrayList<String>> or better lets program on interfaces rather than actual type and make our reference more general (which also means flexible because it can handle many lists, not only ArrayList) with
List<List<String>> list = new ArrayList<List<String>>();
or since Java 7 we can shorten it using diamond operator and let generic type be inferred
List<List<String>> list = new ArrayList<>();
You can create it via code like
String[][] things={{"dog", "cat", "wolf"},{ "carrot", "apple", "banana"}};
List<List<String>> list = new ArrayList<>();
for (String[] row : things){
list.add(new ArrayList<>(Arrays.asList(row)));
}
and use it like
System.out.println(list.get(1).get(2));//get row indexed as 1,
//and from it item indexed as 2
Try to think of list as one dimensional array. Actually all arrays are one dimensional, because two dimensional arrays are simply one dimensional arrays which elements are other one dimensional arrays (you are nesting one dimensional arrays).
So your array
A{
[0] -> B{
[0] -> "dog",
[1] -> "cat",
[2] -> "wolf"
}
[1] -> C{
[0] -> "carrot",
[1] -> "apple",
[2] -> "banana"
}
}
So we have one dimensional array A which contains other one dimensional arrays B and C.
Same is possible for list. You can nest them just like arrays are nested.
ListA{
[0] -> ListB{
[0] -> "dog",
[1] -> "cat",
[2] -> "wolf"
}
[1] -> ListC{
[0] -> "carrot",
[1] -> "apple",
[2] -> "banana"
}
}
So we can have List< of Lists< of String>> which is written as List<List<String>