+ 1

Help me about Multidimensional arrays in java.... I read do many articles but i cant understand it.... If you know help me...

How Multidimensional arrays... work in java

15th Apr 2018, 1:47 AM
Alwin
Alwin - avatar
6 Respostas
+ 3
k is just a counter, starting from zero. It is incremented after each cell of the table (2D array) is populated.
15th Apr 2018, 3:12 AM
Emma
+ 1
Can you expand on where you are stuck? Are you having problems using them? Or are you confused about their implementation under the hood?
15th Apr 2018, 2:55 AM
Emma
+ 1
it doesn't have anything to do with multi dimension array. it's just for holding a number (witch increases as we pass each element in the array..so in the end it's value will equal the index of last element)
15th Apr 2018, 3:13 AM
Farshaad Heydari
Farshaad Heydari - avatar
0
iam confused at how it is implemented on the program.. https://code.sololearn.com/cWO8bQXsa7a7/?ref=app look this code...why the k is used, k++, and for loop doesnt ring any bells to me..
15th Apr 2018, 3:00 AM
Alwin
Alwin - avatar
0
it's an array of arrays. each row of a multi dimension array is an array . so when u write myMultiArray[2][3]; it means that u want to access the element that is in the index 3 of an array witch that array it self is in the row of index 2 in that multidimensional array
15th Apr 2018, 3:04 AM
Farshaad Heydari
Farshaad Heydari - avatar
0
why k is used in above my code
15th Apr 2018, 3:08 AM
Alwin
Alwin - avatar