int[][] matrix = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};Given the above definition for the two dimensional array of ints called matrix, what would each of the following print to the command line if run.
System.out.println("matrix[1][1]: " + matrix[1][1]);
System.out.println("matrix[0][2]: " + matrix[0][2]);
for(int i = 0; i < matrix.length; i++) { System.out.print(matrix[i][0] + " "); }
int[][] raggedMatrix = {{1, 2, 3}, {4, 5}, {6}};
/* * Returns true if the specified matrix is square, false otherwise. * (In a square matrix every row has as many elements in it as there are rows) */ public boolean isSquare(int[][] matrix) { }
/* * Returns the sum of all of the elements in the specified matrix's main diagonal. * If the matrix is not square it returns -1. * (The main diagonal consists of the elements for which the index of the row * and the column are the same.) */ public int getDiagonalSum(int[][] matrix) { }