A. The elements in the collection are ordered.
B. The collection is guaranteed to be immutable.
C. The elements in the collection are guaranteed to be unique.
D. The elements in the collection are accessed using a unique key.
E. The elements in the collections are guaranteed to be synchronized.
您可能感兴趣的试卷
你可能感兴趣的试题
A. Java.util.Map
B. Java.util.Set
C. Java.util.List
D. Java.util.StoredSet
E. Java.util.StoredMap
F. Java.util.Collection
switch (i) {
default:
System.out.printIn(“Hello”);
}
What is the acceptable type for the variable i?()
A. Byte
B. Long
C. Float
D. Double
E. Object
F. A and B
G. C and D
int I=1, j=0
switch(i) {
case 2:
j+=6;
case 4:
j+=1;
default:
j +=2;
case 0:
j +=4;
}
What is the value of j at line 16?()
A. 0
B. 1
C. 2
D. 4
E. 6
public class WhileFoo {
public static void main (String args) {
int x= 1, y = 6;
while (y--) {x--;}
system.out.printIn(“x=” + x “y =” + y);
}
}
What is the result?()
A. The output is x = 6 y = 0
B. The output is x = 7 y = 0
C. The output is x = 6 y = -1
D. The output is x = 7 y = -1
E. Compilation will fail.
public class X {
public static void main (String args) {
byte b = 127;
byte c = 126;
byte d = b + c;
}
}
Which statement is true?()
A. Compilation succeeds and d takes the value 253.
B. Line 5 contains an error that prevents compilation.
C. Line 5 throws an exception indicating “Out of range”
D. Line 3 and 4 contain error that prevent compilation.
E. The compilation succeeds and d takes the value of 1.
public class X {
public static void main (Stringargs) {
int a = new int [1]
modify(a);
System.out.printIn(a[0]);
}
public static void modify (int a) {
a[0] ++;
}
}
What is the result?()
A. The program runs and prints “0”
B. The program runs and prints “1”
C. The program runs but aborts with an exception.
D. An error “possible undefined variable” at line 4 causes compilation to fail.
E. An error “possible undefined variable” at line 9 causes compilation to fail.
A. 16>4
B. 16/2
C. 16*4
D. 16>>2
E. 16/2^2
F. 16>>>2
public class X {
public static void main (Stringargs) {
string s = new string (“Hello”);
modify(s);
System.out.printIn(s);
}
public static void modify (String s) {
s += “world!”;
}
}
What is the result?()
A.The program runs and prints “Hello”
B.An error causes compilation to fail.
C.The program runs and prints “Hello world!”
D.The program runs but aborts with an exception.
public class Foo {
public static void main (String args) {
int i = 1;
int j = i++;
if ((i>++j) && (i++ ==j)) {
i +=j;
}
}
}
What is the final value of i?()
A. 1
B. 2
C. 3
D. 4
E. 5
public class X {
public static void main (Stringargs) {
String s1 = new String (“true”);
Boolean b1 = new Boolean (true);
if (s2.equals(b1)) {
System.out.printIn(“Equal”);
}
}
}
What is the result? ()
A. The program runs and prints nothing.
B. The program runs and prints “Equal”
C. An error at line 5 causes compilation to fail.
D. The program runs but aborts with an exception.
![](https://static.ppkao.com/ppmg/img/appqrcode.png)
最新试题
Which two statements are true?()
Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5?()
Which statement is true?()
Which two are possible results?()
Given that Triangle implements Runnable, and:Which two statements, inserted independently at both lines 35 and 41, tend to allow both threads to temporarily pause and allow the other thread to execute?()
What can be a result?()
What is the result?()
What is the result?()
What is the appropriate definition of the hashCode method in class Person?()
Which statement is true?()