题目内容

What do you normally use with a partially-filled array?对于部分填充的数组,通常使用什么?

A class that does nothing but manage the array 除了管理数组外什么也不做的类
B. An accompanying parallel array 伴随的并行阵列
C. An accompanying integer value that holds the number of items stored inthe array一个附带的整数值,用于保存数组中存储的项数
D. An accumulator 一个累加器

查看答案
更多问题

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

答案查题题库