A multidimensional arrays are arrays of arrays. We can declare a two dimensional array as follows
int [][] a;
or
int a[][];
In Java it is no needed that to declare the memory at the time of declaration. We can specify only one dimension at the time of allocation and the second dimension can be allocated manually
Example:
int a[][]=new int[3][];
a[0]=new int [3];
a[1]=new int [3];
a[2]=new int [3];
We can also allocate memory for the second dimension as per our requirement like
int a[][]= new int[3][];
int a[0] = new int[1];
int a[1] = new int[3];
int a[2] = new int[2];
this kind of array is used when it is sparsely populated.

