+ 2

What is meant by multidimensional array..

6th Jul 2017, 6:43 AM
Haritha Reddy
Haritha Reddy - avatar
6 Respuestas
+ 3
Array in array.
6th Jul 2017, 7:05 AM
Hello Buddy
Hello Buddy - avatar
+ 3
/*Its basicly array of strings or intergers the boxes [] []are there to tell the system which array to use/print for example..*/ String [][]x = {{"Hello ","Hey "},{"World!!","Planet!!}}; System.out.println(x[0][0] + x [1][0] ); /*output Hello World!! Remeber that java counts from 0 to 1 when working with things like this. x [0][0] = [0] 1st array list [0] 1st array word x [1][0] = [1] 2 array list [0] 1st array word kind of confusing if your new but aslong as you see that 0 is basicly 1 in the way we count then it makes sense why java does this*/
6th Jul 2017, 7:57 AM
D_Stark
D_Stark - avatar
+ 1
multidimensional usually refers for just 2 lengths. If you have a table 3 by 3, it's useful if you can identify one spot by x,y coordinates. So a multidimensional array is just way of saying that you have a table, or a map with longitude and latitude, but it works only on indexes and it starts with 0. example : String myLatitude = myarray [0,0] is the first element in a table
6th Jul 2017, 7:07 AM
Claudiu Stefan Haidu
Claudiu Stefan Haidu - avatar
0
A classic array is like this : myArr[3]={1,2,3} A multidimentionnal array is : myMultiArray[2][2]={{1,2}{5,9}} myMultiArray [1][0] == 5 Ask if you want more informations
6th Jul 2017, 6:49 AM
Jojo
0
you put a box inside a box.
6th Jul 2017, 7:07 AM
Hello Buddy
Hello Buddy - avatar
0
Instead of a 2x2 matrix that is easily represented on a flat screen, imagine a die with more sides...
3rd Aug 2017, 12:34 AM
Sabine Scott
Sabine Scott - avatar