22.2 Dアレイの使用
たじゅうはいれつ
スーパー2 Dアレイ
平面(2 Dアレイ)または空間(3 Dアレイ)インプリメンテーションの使用
2 Dアレイの例
int[][] arr = {{1,2,3}, {4,5,6}}
public class TwoDimensionTest {
public static void main(String[] args) {
int[][] arr = { {1,2,3}, {4,5,6,7}};
int i, j;
for(i =0; i<arr.length; i++) {
for(j=0; j<arr[i].length; j++) {
System.out.print(arr[i][j] + " ");
}
System.out.println(", \t" + arr[i].length);
System.out.println();
}
}
}
Reference
この問題について(22.2 Dアレイの使用), 我々は、より多くの情報をここで見つけました https://velog.io/@ldevlog/22.-2차원-배열-사용하기テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol