多项选择题
Given that c is a reference to a valid java.io.Console object, which two code fragments read a line of text from the console?()
A.String s = c.readLine();
B.char[ ] c = c.readLine();
C.String s = c.readConsole();
D.char[ ] c = c.readConsole();
E.String s = c.readLine("%s", "name ");
F.char[ ] c = c.readLine("%s", "name ");
相关考题
-
多项选择题
Whichthreestatementsconcerningtheuseofthejava.io.Serializableinterfacearetrue?()
A.Objects from classes that use aggregation cannot be serialized
B.An object serialized on one JVM can be successfully deserialized on a different JVM
C.The values in fields with the volatile modifier will NOT survive serialization and deserialization
D.The values in fields with the transient modifier will NOT survive serialization and deserialization
E.It is legal to serialize an object of a type that has a supertype that does NOT implement java.io.Serializable -
单项选择题
Given that the current directory is empty, and that the user has read and write privileges to the current directory, and the following: Which statement is true?()
A.Compilation fails.
B.Nothing is added to the file system.
C.Only a new file is created on the file system.
D.Only a new directory is created on the file system.
E.Both a new file and a new directory are created on the file system. -
单项选择题
If the user types the password aiko when prompted, what is the result?()
A.password:got
B.password:got aiko
C.password:aiko;got aiko
D.An exception is thrown at runtime.
E.Compilation fails due to an error on line 8.
