在Java中打印二维数组有几种常见的方法:
1. 使用`Arrays.toString()`方法:
int[][] array = {{1, 2, 3}, {4, 5, 6}};for (int[] row : array) {System.out.println(Arrays.toString(row));}
2. 使用`Arrays.deepToString()`方法:
int[][] array = {{1, 2, 3}, {4, 5, 6}};System.out.println(Arrays.deepToString(array));

3. 使用嵌套的for循环:
int[][] array = {{1, 2, 3}, {4, 5, 6}};for (int i = 0; i < array.length; i++) {for (int j = 0; j < array[i].length; j++) {System.out.print(array[i][j] + " ");}System.out.println();}
4. 使用for-each循环:
int[][] array = {{1, 2, 3}, {4, 5, 6}};for (int[] row : array) {for (int value : row) {System.out.print(value + " ");}System.out.println();}
