Driver code
public static void main ( String [ ] args ) { int size = 3 ; ArrayList < ArrayList < Integer > > maze = new ArrayList < ArrayList < Integer > > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { maze . add ( new ArrayList < Integer > ( ) ) ; }