As far as I know, its the same sort of thing in Java as in C++ - in which case, you need to specify types between the angular brackets
Code:
ArrayList< ArrayList<String> > my_2dlist =
new ArrayList< ArrayList<String> >();
my_2dlist.add( new ArrayList<String>() );
my_2dlist.get(0).add("Hello, World");
System.out.println(my_2dlist.get(0).get(0));