单项选择题
Given:
What is the output?()
A.42
B.420
C.462
D.42042
E.Compilation fails.
F.An exception is thrown at runtime.
相关考题
-
多项选择题
Given: Which two can be results?()
A. java.lang.RuntimeException: Problem
B. run.java.lang.RuntimeException: Problem
C. End of method.java.lang.RuntimeException: Problem
D. End of method.run.java.lang.RuntimeException: Problem
E. run.java.lang.RuntimeException: Problem End of method. -
多项选择题
Given: Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ?()
A.move the line 12 print statement into the foo() method
B.change line 7 to public synchronized void go() {
C.change the variable declaration on line 2 to private volatile int x;
D.wrap the code inside the foo() method with a synchronized( this ) block
E.wrap the for loop code inside the go() method with a synchronized block synchronized(this){ //for loop code here } -
单项选择题
Click the Exhibit button. What is the output if the main() method is run?()
A.4
B.5
C.8
D.9
E.Compilation fails.
F.An exception is thrown at runtime.
G.It is impossible to determine for certain.
