单项选择题
public class IfTest (
public static void main(string[]args) {
int x = 3;
int y = 1;
if (x = y)
system.out.printIn(“Not equal”);
else
system.out.printIn(“Equal”);
}
)
What is the result?()
A. The output is “Equal”
B. The output in “Not Equal”
C. An error at line 5 causes compilation to fall.
D. The program executes but does not print a message.
相关考题
-
单项选择题
Whichstatementistruefortheclassjava.util.HashSet?()
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. -
单项选择题
Youneedtostoreelementsinacollectionthatguaranteesthatnoduplicatesarestoredandallelementscanbeaccessedinnaturalorder.Whichinterfaceprovidesthatcapability?()
A.Java.util.Map.
B.Java.util.Set.
C.Java.util.List.
D.Java.util.StoredSet.
E.Java.util.StoredMap.
F.Java.util.Collection. -
填空题
3. string foo = “ABCDE”; 4. foo.substring(3); 5. foo.concat(“XYZ”); 6. Type the value of foo at line 6.()
