单项选择题
Given:
12.Date date = new Date();
13.df.setLocale(Locale.ITALY);
14.String s = df.format(date);
The variable df is an object of type DateFormat that has been initialized in line 11.
What is the result if this code is run on December 14, 2000?()
A.The value of s is 14-dic-2000.
B.The value of s is Dec 14, 2000.
C.An exception is thrown at runtime.
D.Compilation fails because of an error in line 13.
相关考题
-
单项选择题
Given: What is the result?()
A.int Long
B.Short Long
C.Compilation fails.
D.An exception is thrown at runtime. -
单项选择题
Given: Which statement is true?()
A.Compilation fails.
B.An exception is thrown at runtime.
C.Synchronizing the run() method would make the class thread-safe.
D.The data in variable "x" are protected from concurrent access problems.
E.Declaring the doThings() method as static would make the class thread-safe. -
多项选择题
Given that Triangle implements Runnable, and: Which two statements, inserted independently at both lines 35 and 41, tend to allow both threads totemporarily pause and allow the other thread to execute?()
A.Thread.wait();
B.Thread.join();
C.Thread.yield();
D.Thread.sleep(1);
E.Thread.notify();
