数组

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}};

posted @ 2017-03-02 09:38  Rainyn  阅读(116)  评论(0编辑  收藏  举报