题目内容

To return an array of long values from a method, use this as the return type for the method. 若要从方法返回long型数组,请将此作为方法的返回类型。

A. long
B. long[]
C. long[ARRAY_SIZE]
D. []long

查看答案
更多问题

In memory, an array of String objects 在内存中,字符串对象的数组

A. consists of elements, each of which is a reference to a String object.由元素组成,每个元素都是一个字符串对象的引用。
B. is always implemented as a ragged array. 总是以不规则数组的形式实现
C. consists of elements, each of which is a String object. 由元素组成,每个元素是一个字符串对象
D. must be initialized when the array is declared. 必须在声明数组时初始化

Given that String[] str has been initialized, to get a copy of str[0] with all characters converted to upper case, use the following statement: 给定字符串[]str已经被初始化,要获得str[0]的一个副本,并将所有字符转换为大写,请使用以下语句:

A. str.uppercase();
B. str[0].upperCase();
C. str.toUpperCase();
D. str[0].toUpperCase();

已知数组array,其最后一个元素的下标是?

A. array. size
B. array. length-1
C. array. size-1
D. array.length

现有:class Rectangle {public static void main(String[] args) {int[] x = { 1, 2, 3 };x[1] = (x[1] > 1) ? x[2] : 0;System.out.println(x[1]);}}结果为:

A. 3
B. 2
C. 1
D. 0

答案查题题库