📜  如何在java代码示例中打印矩阵

📅  最后修改于: 2022-03-11 14:52:48.394000             🧑  作者: Mango

代码示例3
public static void printMatrix(Object[][] matrix){
        for (int i = 0; i < matrix.lenght ; i++) {
            for (int j = 0; j < matrix.lenght; j++) {
                System.out.print(matrix[i][j] + " ");
            }
            System.out.println();
        }
    }