final int[][] matrix = {
{ 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 }
};
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix[i].length; j++) {
System.out.print(matrix[i][j] + " ");
}
System.out.println();
}
Produces:
1 2 3
4 5 6
7 8 9
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…