In the explanation of the ans I found this rule,which I have asked initially for.
Please explain how the assignment is going on.
I have no idea what rule you are referring to. In assignments, the rule (for types) is simple, if the right side can be treated as the type of object as the reference type of the left side, the assignment is allowed.
a) b2[0][1]=b;
b is a 2D array (or more specficially an array of array of byte). b2 is a 4D array. When b2 is dereferenced twice, the left side an 2D element reference. Same as the right side.
b) b[0][0]=b3;
b3 is a byte. b is a 2D array. When b is derefereced twice, the left side is a byte. Same as the right side.
c) b2[1][1][0]=b[0][0];
b is a 2D array. When b is derefereced twice, the right side is a byte. b2 is a 4D array. When b2 is dereferenced thrice, the left side is a byte array reference element. Not the same as the right side.
d) b2[1][2][0]=b;
b is a 2D array. b2 is a 4D array. When b2 is dereferenced thrice, the left side is a byte array reference element. Not the same as the right side.
e) b2[0][1][0][0]=b[0][0];
b is a 2D array. When b is derefereced twice, the right side is a byte. b2 is a 4D array. When b2 is dereferenced 4 times, the left side is a byte. Same as the right side.
f) b2[0][1]=big;
big is a 2D array. b2 is a 4D array. When b2 is dereferenced twice, the left side an 2D element reference. Same as the right side.
Henry