can be defined in simple words as array of arrays. Data in multidimensional arrays are stored in tabular form (in row major order).
A data structure that contains data in tabular format. Array/s within an array or in mathematical terminology - subset/s of a set
for (int row = 0; row < tttboard.length; row++) { //traverse the row
for (int col = 0; col < tttboard[0].length; col++) { //traverse each data in a row
System.out.print(tttboard[row][col]); //print each element in a row
}
System.out.println(); //move next print to next line
}
int[][] table = new int[3][3];
table[0][0] = 1;
table[0][1] = 2;
table[0][2] = 3;
table[1][0] = 2;
table[1][1] = 3;
table[1][2] = 1;
table[2][0] = 3;
table[2][1] = 2;
table[2][2] = 1;
1 2 3
2 3 1
3 2 1
for(int i = 0; i < board.length; i++ ){
for(int j = 0; j < board[i].length; j++){
System.out.print(board[i][j] + " ");
}
System.out.println();
}