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
y = x;
A. x[] = {36, 78, 12, 24} and y[] = {23, 55, 83, 19}
B. x[] = {36, 78, 12, 24} and y[] = {36, 78, 12, 24}
C. x[] = {23, 55, 83, 19} and y[] = {23, 55, 83, 19}
D. This is acompilation error 这是一个编译错误