[Java] 纯文本查看 复制代码 /**
* 遍历二维数组
*
* @author AnCheng
*
*/
public class Test03 {
public static void main(String[] args) {
int[][] arr = { { 23, 45, 65 }, { 12, 65, 1 }, { 83 }, { 12, 89, 1, 24 } };
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr[i].length; j++) {
System.out.print(arr[i][j] + " ");
}
System.out.println();
}
}
}
|