题目内容

Assume the signature of the method xMethod is as follows.public static void xMethod(double[] a)which of the following could be used to invoke xMethod?

A. xMethod(5);
B. xMethod({3, 4});
C. xMethod(new double[2]);
D. xMethod(new int[2]);

查看答案
更多问题

How can you get the word "abc" in the main method from the following call?java Test "+" 3 "abc" 2

A. args[0]
B. args[3]
C. args[1]
D. args[2]

An array variable can be declared and redeclared in the same block.

A. true
B. false

Assume int[] scores = {1, 20, 30, 40, 50}, what value does java.util.Arrays.binarySearch(scores, 3) return?

A. 2
B. -1
C. 1
D. -2

Assume int[] scores = {1, 20, 30, 40, 50}, what value does java.util.Arrays.binarySearch(scores, 30) return?

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

答案查题题库