0
HELP ME PLZ
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; // 4 what is the meaning of second line code? what does this do for?
3 Answers
+ 1
It re-assigns the value in the [0][2] position of the myArr. [0] being the first sub array of myArr and [2] being the 3rd element of that sub array. So 3 should now be 42.
+ 14
Edits the value of the third item of the first array inside myArr array.... (multidimensional array/Array inside array...)
0
Thank you for helping me, both of you :)