Which index of a multi-dimensional array represents the row index in Java?

  • First index
  • It depends on the array's dimensions.
  • Second index
  • Third index
In Java, for a multi-dimensional array, the first index represents the row index. For a 2D array, it represents the row number, and for a 3D array, it represents the depth along the first dimension. The other indices represent the columns (2nd index), and if applicable, additional dimensions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *