数组
来源:互联网 发布:手机淘宝怎么上传产品 编辑:程序博客网 时间:2024/04/30 14:06
1.一维数组定义
int [ ] arr =new int[100];
int [ ] arm= {1,2,3,4};
2.二维数组定义
int [ ] [ ] arr = new int [3][4]; //3行4列
int [ ] [ ] arr = new int [3] [ ]; //3行不确定列数
int [ ] [ ] arr = {{1,2},{3,4,5,6},{7,8,9}};
0 0