1//Length
2int[][]arr= new int [filas][columnas];
3arr.length=filas;
4
5 int[][] a = {
6 {1, 2, 3},
7 {4, 5, 6, 9},
8 {7},
9 };
10
11 // calculate the length of each row
12 System.out.println("Length of row 1: " + a[0].length);
13 System.out.println("Length of row 2: " + a[1].length);
14 System.out.println("Length of row 3: " + a[2].length);
15 }