public static void main(String[] args) {
//非對稱二維陣列
int[][] array = new int[4][];
array[0] = new int[]{1};
array[1] = new int[]{2,3};
array[2] = new int[]{4,5,6};
array[3] = new int[]{7,8,9,10};
System.out.println("非對稱二維陣列 : ");
// System.out.println(array[0][0]);
// System.out.println(array[1][0]+ " " +array[1][1]);
// System.out.println(array[2][0]+ " " +array[2][1]+ " " +array[2][2]);
// System.out.println(array[3][0]+ " " +array[3][1]+ " " +array[3][2]+ " " +array[3][3]);
//讀取
for(int i = 0;i < array.length;i++){
for(int j = 0;j < array[i].length;j++){
System.out.print(array[i][j]+"\t");
}
System.out.println();
}
}
標籤
Android
(
1
)
DbVisualizer
(
2
)
html/javascript
(
1
)
java
(
11
)
MySQL
(
1
)
oracle
(
1
)
servlet&jsp
(
3
)
struts
(
2
)
沒有留言 :
張貼留言