Solved

Which of the Following Sets of Statements Creates a Multidimensional

Question 11

Multiple Choice

Which of the following sets of statements creates a multidimensional array with 3 rows,where the first row contains 1 value,the second row contains 4 items and the final row contains 2 items?


A) int[][] items; items = new int[ 3 ][ ? ];
Items[ 0 ] = new int[ 1 ];
Items[ 1 ] = new int[ 4 ];
Items[ 2 ] = new int[ 2 ];
B) int[][] items; items = new int[ 3 ][ ];
Items[ 0 ] = new int[ 1 ];
Items[ 1 ] = new int[ 4 ];
Items[ 2 ] = new int[ 2 ];
C) int[][] items; items = new int[ ? ][ ? ];
Items[ 0 ] = new int[ 1 ];
Items[ 1 ] = new int[ 4 ];
Items[ 2 ] = new int[ 2 ];
D) int[][] items; items[ 0 ] = new int[ 1 ];
Items[ 1 ] = new int[ 4 ];
Items[ 2 ] = new int[ 2 ];

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions