Hi Ragu,
Thanx for your reply
but still not clear to me
its ok that while saying
<code>
i=4;
int x[][][]=new int[i][i=3][i];
</code>
that third bracket will have a value of 3 fine
but look at its print statement
<code>
System.out.println( ia.length + ", " + ia[0].length+", "+ ia[0][0].length);
</code>
generally speaking the length of an array represents no of elements in it .
so if i say
<code>
int a[][]=new int[4][3];
</code>
it means array will hold 4*3 12 elements
also in
java Correct me if I am wrong multidimensional arrays are implemented as arrays of arrays.
so when we say ia.length why we get 4 instead of 4*3*3 But as we are reffering to whole arrays not a a subarray inside it.
I can very well get your point that in a 2 dimensional arrays the second part could be left intentionally blank .
I am weak in multidimensional arrays,so if this sort of question comes in my
scjp i am definitely goona have to use hit and try method.
[This message has been edited by amit mawkin (edited November 19, 2001).]