题目内容

If numbers is a two-dimensional array, which of the following would give the length of row r? 如果numbers是一个二维数组,下面哪个选项会给出r行的长度?

A. numbers.length
B. numbers.length[r]
C. numbers[r].length[r]
D. numbers[r].length

查看答案
更多问题

Which of the following is a correct method header for receiving a two-dimensional array as an argument? 下列哪个是接收二维数组作为参数的正确方法头?

A. public static void passArray(int[1,2])
B. public static void passArray(int [][])
C. public static void passArray(int[1],[2])
D. public static void passArray(int[], int[])

A ragged array is: 一个不规则的数组是:

A. a two-dimensional array for which the number of rows is unknown 一个二维数组,其行数未知
B. a one-dimensional array for which the number of elements is unknown 一个元素数目未知的一维数组
C. a two-dimensional array where the rows are of different lengths 一个二维数组,其中的行具有不同的长度
D. There is no such thing as a ragged array 没有所谓的不规则数组

long[] array1 = new long[ARRAY_SIZE];

A. Declares array1 to be a reference to an array of long values 声明array1是一个long型数组的引用
B. Creates aninstance of an array of 10 long values 创建一个包含10个long型的数组的实例
C. Will allowvalid subscripts in the range of 0 - 9 将允许0 - 9范围内的有效下标
D. All of the above 以上都是

}

A. 50
B. 55
C. 60
D. 65

答案查题题库