Given the following program: public class Test {public static void main(String[] args) {for (int i = 0; i < args.length; i++) {System.out.print(args[i] + " ");}} } What is the output, if you run the program using java Test 1 2 3
A. 3
B. 1 2 3
C. 1 2
D. 1
查看答案
Assume int[] scores = {1, 20, 30, 40, 50}, what is the output of System.out.println(java.util.Arrays.toString(scores))?
A. [1, 20, 30, 40, 50]
B. {1 20 30 40 50}
C. [1 20 30 40 50]
D. {1, 20, 30, 40, 50}
Suppose int[] numbers = new int[10], what is numbers[0]?
A. 10.
B. null
C. 0
D. undefineD.
You can use the operator == to check whether two variables refer to the same array.
A. false
B. true
The arguments passed to the main method is an array of strings. If no argument is passed, args.length is 0.
A. true
B. false