- 1
What is different between array 1d and 2d
2 Antworten
+ 3
int[] arr = new int[5];
this is one dimensional array you have only rows. number of rows is 5.
int[] array = new int[5][6]
this is 2d array you have rows as well as columes.
number of rows is 5.
number of columes is 6.
0
no different. it's the same for your memory allocation
we can see a 2d array as an 1d ..