题目内容

The reverse method is defined in the textbook. What is list1 after executing the following statements? int[] list1 = {1, 2, 3, 4, 5, 6}; list1 = reverse(list1);

A. list1 is 6 6 6 6 6 6
B. list1 is 6 5 4 3 2 1
C. list1 is 0 0 0 0 0 0
D. list1 is 1 2 3 4 5 6

查看答案
更多问题

The arraycopy method does not allocate memory space for the target array. The target array must already be created with memory space allocateD.

A. true
B. false

Given the following statementint[] list = new int[10];

A. The array variable list contains a memory address that refers to an array of 10 int values.
B. The array variable list contains ten values of type int.
C. The array variable list contains a memory address that refers to an array of 9 int values.
D. The array variable list contains nine values of type int.

When you pass an array to a method, the method receives __________.

A. a copy of the first element
B. a copy of the array
C. the reference of the array
D. the length of the array

Assume int[] t = {1, 2, 3, 4}. What is t.length?

A. 4
B. 5
C. 0
D. 3

答案查题题库