public class ArrayTest5
{
public static void main(String[] args)
{
int[] [] a = new int [][]{{1,2,3},{4},{5,6,7,8}};
for (int i = 0; i < a.length; i++ ) //数组的行
{
for (int j = 0; j < a[i].length; j++ ) //列
{
System.out.print(a[i][j] + " ");
}
System.out.println();
}
}
}
Java 基础一些代码练习笔记(Array二维数组)
最新推荐文章于 2022-11-24 20:51:55 发布