public class CreateTwoArray{ public static void main(String []args){ int[][]arr=new int [2][3]; System.out.println("数组arr的初始化后:"); System.out.println("数组arr.length为"+arr.length); for(int i=0;i<2;i++){ for(int j=0;j<3;j++){ arr[i][j]=i+j; System.out.println("arr["+i+"]["+j+"]="+arr[i][j]+""); } System.out.println(); } } }
时间: 2024-10-30 04:39:47