Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Read and analyze the following program and give the running results of the program.
Read and analyze the following program and give the running results of the program.
int[][] iArr = { { 1,2 },{ 3,4,5,6 },{ 7,8,9 },{ } };

An irregular two-dimensional array of Java integers with 4 rows is defined.

1 line has 2 columns, 2 lines have 4 columns, 3 lines have 3 columns, and 4 lines have 0 columns.

And iArr.length shows the number of rows of the two-dimensional array iArr.

IArr [0]。 Length, IARR [1]. Length, IARR [2]. Length, IARR [3]. Length displays the number of columns in each row in the two-dimensional array IARR.

So the running result of the above program is

Length of iArr =4

IArr[0] =2 length of 2

The length of iArr [1] =4

IArr[2] =3 the length of 3

IArr[3] =0 length