A multidimensional array is an array whose elements are themselves arrays. The most common form is a D array, which you can think of as a table with rows and columns:
int[][] grid = new int[3][4];
This creates rows and columns. Every element defaults to . You access elements with two indices: grid[row][col].
You can also use a literal:
int[][] grid = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
System.out.println(grid[1][2]); // 6
grid[1] gives you the entire second row as a regular int[] array. grid[1][2] gives you the element at row , column .