java two dimensional array as parameter code example
Example 1: java two dimensional arrays
int[][] multiples = new int[4][2]; // 2D integer array with 4 rows
and 2 columns
String[][] cities = new String[3][3]; // 2D String array with 3 rows
and 3 columns
Example 2: multidimensional arrays java
ships: [
{ locations: [0, 0, 0], hits: ["", "", ""] },
{ locations: [0, 0, 0], hits: ["", "", ""] },
{ locations: [0, 0, 0], hits: ["", "", ""] }
],