Originally posted by Veena Point:
What changes I should make in the above code to get the following o/p
b2[0][0][0][0] 3
b2[0][0][0][1] 4
I have not tried to run the code, but my assumptions are as follows.
The values 3 and 4 are stored at
b2[0][0][1][0] 3
b2[0][0][1][1] 4
Since you have declared b2 as
byte b2[][][][]=new byte[2][3][1][2];
you won't have access to the elements where 3 and 4 are stored. You could solve the access problem by defining b2 as follows.
byte b2[][][][]=new byte[2][3][2][2];
If you want the declaration of b2 to remain unchanged and if you don't need access to the first two elements of b then you could try the following new assignment statement.
b2[0][0][0]=b[1];
As I mentioned earlier, I have not tried the code but I think that it will work.
I wish you luck.