Write about Variable size arrays in Java?
https://www.computersprofessor.com/2017/01/write-about-variable-size-arrays-in-java.html
Variable size array:
|
Java treats
multidimensional array as “arrays of arrays”. it is possible to declare a
two–dimensional array as follows:
int x[ ] =new
int[3][ ];
x[0]=new
int[2];
x[1]=new int[4];
x[2]=new
int[3];
These
statements create a two–dimensional array as having different length for each
row as shown as follows.
|