by, 03-04-2012 at 11:24 AM (581 Views)
Array of arrays also consists of multi dimensional arrays. Multi-dimensional variables could be declared by specifying the every extra index. This is done by using square bracket set.
In case of a multi-dimensional array, memory is allocated by specifying memory for leftmost (1st) dimension.Java Code:For example: int myArray[ ][ ] = new int ;
Rest of the dimensions can be allocated separately.
In multi-dimensional array, every array’s length is in one’s control.
Multi-dimensional array’s declarations will be better explained by the given example:
Java Code:int myArray = new int; myArray  = new int; myArray  = new int; myArray  = new int; myArray  = new int;