Is it possible to explain multiTab in Java ? For this example :
int[][] multiTab = {{1,2,3,4,5,6},
{1,2,3,4},
{1,2,3,4,5,6,7,8,9}};
What would be the rows and the columns ?
Is it possible to explain multiTab in Java ? For this example :
int[][] multiTab = {{1,2,3,4,5,6},
{1,2,3,4},
{1,2,3,4,5,6,7,8,9}};
What would be the rows and the columns ?
int[][] multiTab = {{1,2,3,4,5,6},//[0][x]
{1,2,3,4},//[1][x]
{1,2,3,4,5,6,7,8,9}};//[2][x]
This type of array can also be called a multidimensional array. This is a type of array that is useful if you want to get information that hangs together. Example:
if [0][x] is a country, [1][x] is a city and [2][x] is some other info, you can use the same var for x but change the first var to get the info that hangs together.
Read more here: http://www.homeandlearn.co.uk/java/multi-dimensional_arrays.html
Or here: Syntax for creating a two-dimensional array
Or here: http://www.dailyfreecode.com/code/multi-dimensional-array-1352.aspx