Write about Variable size arrays in Java?

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.

variable length array

Related

Java 6829461821043110892

Post a Comment

emo-but-icon

item