(int[][] matrix)
| 115 | } |
| 116 | |
| 117 | public static int[][] cloneMatrix(int[][] matrix) { |
| 118 | int[][] c = new int[matrix.length][matrix[0].length]; |
| 119 | for (int i = 0; i < matrix.length; i++) { |
| 120 | for (int j = 0; j < matrix[0].length; j++) { |
| 121 | c[i][j] = matrix[i][j]; |
| 122 | } |
| 123 | } |
| 124 | return c; |
| 125 | } |
| 126 | |
| 127 | public static void main(String[] args) { |
| 128 | int nrows = 10; |