Hi Nitin,
You are right a two dimensional can be declared by <code>
int[][]x=new int[2][]; // Legal</code>, but <CODE>
int[][]x=new int[][2]; // is ILLEGAL </CODE>.
You may like to see the folowing code:
Hope this serves your purpose.
All the best for your
SCJP.
Cheers,
Ravindra Mohan