+ 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
6 Respuestas
+ 3
k is just a counter, starting from zero. It is incremented after each cell of the table (2D array) is populated.
+ 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?
+ 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)
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..
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
0
why k is used in above my code