Java How to Program, 11/e Multiple Choice Test Bank 11 of 16
a. are not directly supported.
b. are implemented as arrays of arrays.
c. are often used to represent tables of values.
d. All of the above.
7.11 Q2: In array items, which expression below accesses the value at row 3 and column
4?
a. items[3].[4]
b. items[3[4]]
c. items[3][4]
d. items[3, 4]
7.11 Q3: An array with m rows and n columns is not ________.
A. an m–by–n array.
B. an n–by–m array.
C. a two-dimensional array.
D. a dual-transcripted array.
a. A and C.
b. A and D.
c. B and D.
d. B and C.
7.11 Q4: Which statement below initializes array items to contain 3 rows and 2 columns?
a. int[][] items = {{2, 4}, {6, 8}, {10, 12}};
b. int[][] items = {{2, 6, 10}, {4, 8, 12}};
c. int[][] items = {2, 4}, {6, 8}, {10, 12};
d. int[][] items = {2, 6, 10}, {4, 8, 12};
7.11 Q5: For the array that was the correct answer in the previous question, what is the
value returned by items[1][0]?
a. 4.
b. 8.
c. 12.
d. 6.
7.11 Q6: Which of the following statements creates a multidimensional array with 3 rows,
where the first row contains 1 element, the second row contains 4 elements and the final
row contains 2 elements?