This week's book giveaway is in the Servlets forum. We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line! See this thread for details.

Hi Keith: I tried to run this program. It's running fine for every other options except option 3. Whereas I guess it should also compile...isn't it??

b2[1][1][0] = b[0][0];

Here, in the LHS b2 needs a single dimension object(i.e only a single variable) and on the RHS the b[0][0] point to a single variable. Hence it should be compatible with each other. I am not getting why it's giving error. Please help!!!

Hi Supriya, I am not too good at multi dimensional arrays but I will try to explain it... I will take it one by one:

1.b2 is a multidimensional array but here it's given as b2[0][1] hence, this will become a 2 D array(as 2 dimensions of b2 are already specified so there remains only 2). Whereas b is also a 2D array hence it will get fit into b2

2. I think this one is easy..here b[0][0] is the index position of element at (0,0) in b hence our primitive variable b3 will easily fit into it.

3. As I explained earlier b2[1][1][0] is a 3D array so remains only 1D Hence, it needs a 1D array and not a 2d. that's y b[0][0] can't fit into it.

4. Again we are trying to fit a 2D array into 1D array. Hence it"ll give error.

5.it's pretty clear.

6.here, b2 is also 2D array and big is also 2D array so b3 can be assigned to b2.

I think it helps...I tried my level best but still if u find any errors. I apologize for that.