Complete the code to declare a jagged array of integers with 3 rows.
int[][] jaggedArray = new int[[1]][];The jagged array is declared with 3 rows, so the first dimension size is 3.
Complete the code to initialize the second row of the jagged array with 4 elements.
jaggedArray[[1]] = new int[4];
Array indices start at 0, so the second row is at index 1.
Fix the error in the code to assign the value 10 to the first element of the third row.
jaggedArray[[1]][0] = 10;
The third row is at index 2 because indexing starts at 0.
Fill both blanks to create a jagged array with 2 rows, where the first row has 3 elements.
int[][] jaggedArray = new int[[1]][]; jaggedArray[0] = new int[[2]];
The jagged array has 2 rows, so the first blank is 2. The first row has 3 elements, so the second blank is 3.
Fill all three blanks to initialize a jagged array with 3 rows, where the first row has 2 elements, the second row has 4 elements.
int[][] jaggedArray = new int[[1]][]; jaggedArray[0] = new int[[2]]; jaggedArray[1] = new int[[3]];
The jagged array has 3 rows (blank 1). The first row has 2 elements (blank 2). The second row has 4 elements (blank 3).