multidimensional arrays | Sololearn: Learn to code for FREE!

+1

multidimensional arrays

Hello, Didn't quite understand the multidimensional arrays. In the following exemple: int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; // 4 why does myArr[0][2]=42? can anyone help? tks

10/2/2017 12:56:01 PM

Luís Miguel

2 Answers

New Answer

+1

tks. I'm kinda new here, so...