package com.aflfte.array;
/**
* 二维数组的使用
* @author root
*
*/
public class Test2DimensionArray {
public static void main(String[] args) {
//二维数组的声明
int[][] a=new int[3][];
a[0]=new int[] {20,30};
a[1]=new int[] {10,40};
a[2]=new int[] {50,10};
System.out.println(a[1][1]);
//定义静态化二维数组方法
int[][] b= {
{20,30},
{50,60,80},
{100,500,40}
};
System.out.println(b[2][1]);
}
}
class car{
}
« 利用二维数组存储表格数据
|
Arrays工具类的使用»
|