java code:
public class ArrayTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[][] a = {{1,2},{3},{4,5}};
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a[i].length; j++) {
System.out.print(a[i][j]+" ");
}
System.out.println();
}
System.out.println("--------------");
System.out.println("a'length' ->: "+a.length);
}
}
ouput:
1 2
3
4 5
--------------
a'length' ->: 3
请问:
这里的a.length表示的“数组的行数”是什么意思哈,怎么长度在这里是3?都变成行数了,对其概念有点模糊了···