Assume double[] scores = {1, 2, 3, 4, 5}, what value does java.util.Arrays.binarySearch(scores, 3.5) return?
查看答案
What is the correct term for numbers[99]?
A. array
B. index variable
C. index
D. indexed variable
Which of the following is correct to create an array?
A. int[] m = {1, 2, };
B. int[] m = {{1, 2}, {3, 4}};
C. int[] m = {{1, 2}};
D. int[] m = {1, 2, 3};
Suppose a method p has the following heading: public static int[] p()What return statement may be used in p()?
A. return 1;
B. return int[]{1, 2, 3};
C. return new int[]{1, 2, 3};
D. return {1, 2, 3};
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