java简单数组定义


public class Shuzu {

static int[] array = new int[] { 32, 2, 2, 5, 45, };

int[] array1[] = new int[10][20];
int[][] array2=new int[2][3];
int array3[][] =new int[2][3];

int[][] c = new int[][]{{2,2},{3,3},{2,3}};
int[][] c1 = {{2,2},{3,3},{2,3}};

public static void main(String[] args) {
for (int i : array) {
System.out.print(i + "\t");
}

System.out.println();

int[] a = { 32, 2, 5, 2 };
for (int i : a) {
System.out.print(i + "\t");
}

System.out.println();
int[] b = new int[5];

}
}

posted @ 2017-05-13 18:52  Jachin  阅读(301)  评论(0编辑  收藏  举报