|
|
Q4019 How do I create and use multidimensional arrays in Java?
irt.org | Knowledge Base | Java | Q4019 [ previous next ] Q4019 How do I create and use multidimensional arrays in Java?In Java, Multi dimensional arrays are actually arrays of arrays, these act and look like regular multidimentional array. To declare a multidimentional array variable each additional index is specified by a set of square brackets For example the following declares a two dimensional array called twoD
The left index determines the row and the right index determines the column, to use this you can refer to a particular value by specifying the indices like
which will print the integer in the 4th row 5th col. Feedback on 'Q4019 How do I create and use multidimensional arrays in Java?' |
-- div -->
|