0

Multidimensional array

how to find the value couldn't understand the topic plz explain

28th Jul 2017, 10:04 AM
Maharajan
Maharajan - avatar
2 Respostas
28th Jul 2017, 10:15 AM
RZK 022
RZK 022 - avatar
+ 1
A Multidimensional Array is an array containing other arrays. The simplest kind is the two dimensional array, it is an array containing arrays which do not contain other arrays. int [][] multi = new int [][]{ {3, 4, 5}, {6,7,8} }; If you want to access the array, you just have to use the indexes as in normal arrays. Let's say we want to access the 4: multi [0][1] The first brackets stand for the index of the first array which contains number 4. The second brackets stand for the index of four, you handle it like in a normal array. First you access the array itself, then it's components.
28th Jul 2017, 10:14 AM
Jonas Schröter
Jonas Schröter - avatar