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
Which correctly creates an array of five empty Strings?
A. String[ ] a = new String [5]; for (int i = 0; i < 5; a[i++] = null);
B. String[] a = new String [5];
C. String[] a = {"", "", "", "", ""};
D. String[5] a;