#
13. Assume double[][] x = new double[4][5], what are x.length and
x[2].length?
a. 4 and 5
b. 5 and 5
c. 5 and 4
d. 4 and 4
#
14. Which of the following statements are correct?
a. char[2][] charArray = {{‘a’, ‘b’}, {‘c’, ‘d’}};
b. char[][] charArray = {{‘a’, ‘b’}, {‘c’, ‘d’}};
c. char[2][2] charArray = {{‘a’, ‘b’}, {‘c’, ‘d’}};
d. char[][] charArray = {‘a’, ‘b’};
#
15. Assume boolean[][] x = new boolean[5][7], what are x.length and
x[2].length?
a. 5 and 6
b. 4 and 5
c. 4 and 4
d. 5 and 5
e. 5 and 7
#
16. Suppose a method p has the following heading:
public static int[][] p()
What return statement may be used in p()?
a. return 1;
b. return new int[][]{{1, 2, 3}, {2, 4, 5}};
c. return new int[]{1, 2, 3};
d. return {1, 2, 3};
e. return int[]{1, 2, 3};
#
17. Assume int[][] x = {{1, 2}, {3, 4}, {5, 6}}, what are x.length are
x[0].length?
a. 2 and 3
b. 2 and 2
c. 3 and 3
d. 2 and 1
e. 3 and 2