多项选择题X 纠错
A. Objects from classes that use aggregation cannot be serialized.
B. Art 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 anddeserialization.
D. The values in fields with the transient modifier will NOT survive serialization anddeserialization.
E. It is legal to serialize an object of a type that has a supertype that does NOT implement java.io.Serializable.
你可能喜欢
单项选择题
A. s.defaultReadObject();
B. this = s.defaultReadObject();
C. y = s.readInt(); x = s.readInt();
D. x = s.readInt(); y = s.readInt();
单项选择题
A. Compilation fails.
B. An exception is thrown at runtime.
C. An instance of Forest is serialized.
D. A instance of Forest and an instance of Tree are both serialized.
单项选择题
A. closing the stream
B. flushing the stream
C. writing to the stream
D. marking a location in the stream
E. writing a line separator to the stream
多项选择题
A. Line 16 is never executed.
B. An exception is thrown at runtime.
C. Line 13 creates a File object named “d”.
D. Line 14 creates a File object named “f‟.
E. Line 13 creates a directory named “d” in the file system.
F. Line 16 creates a directory named “d” and a file “f” within it in the file system.
G. Line 14 creates a file named "f " inside of the directory named “d” in the file system.
单项选择题
A. short LONG
B. SHORT LONG
C. Compilation fails.
D. An exception is thrown at runtime.
单项选择题
A. int Long
B. Short Long
C. Compilation fails.
D. An exception is thrown at runtime.
多项选择题
A. String s = “123456789”; s = (s-”123”).replace(1,3,”24”) - “89”;
B. StringBuffer s = new StringBuffer(”123456789”); s.delete(0,3).replace( 1,3, “24”).delete(4,6);
C. StringBuffer s = new StringBuffer(”123456789”); s.substring(3,6).delete( 1 ,3).insert(1, “24”);
D. StringBuilder s = new StringBuilder(”123456789”); s.substring(3,6).delete( 1 ,2).insert( 1, “24”);
E. StringBuilder s = new StringBuilder(”123456789”); s.delete(0,3).delete( 1 ,3).delete(2,5).insert( 1, “24”);
单项选择题
A. 1
B. 2
C. 3
D. 4
E. 5
F. 6
单项选择题
A. synchronize the log method
B. replace StringBuilder with StringBuffer
C. No change is necessary, the current MyLogger code is already thread-safe.
D. replace StringBuilder with just a String object and use the string concatenation (+=) within the log method
单项选择题
A. This code is NOT thread-safe.
B. The programmer can replace StringBuffer with StringBuilder with no other changes.
C. This code will perform well and converting the code to use StringBuilder will not enhance the performance.
D. This code will perform poorly. For better performance, the code should be rewritten: return “<“+ this.name + “>”;