//方法1
int[] grid_1=new int[1];
grid_1[0]=2015;
//方法2
int[] grid_2=new int[]{2015};
//方法3
int[] grid_3={2015};
java中数组的3中初始化方法
最新推荐文章于 2024-06-10 22:32:42 发布

//方法1
int[] grid_1=new int[1];
grid_1[0]=2015;
//方法2
int[] grid_2=new int[]{2015};
//方法3
int[] grid_3={2015};