How can I get the size of an array, a Collection, or a String in Java
https://stackoverflow.com/questions/23730092/how-can-i-get-the-size-of-an-array-a-collection-or-a-string-in-java
WEBint[][] matrix = new int[][] { {1, 2, 3, 4}, {-1, 2, -3, 4}, {1, -2, 3, -4} }; System.out.println(matrix.length); // prints 3 (row length or the length of the array that holds the other arrays) System.out.println(matrix[0].length); // prints 4 (column length or the length of the array at the index 0)
DA: 94 PA: 90 MOZ Rank: 63