public class TestFive { private int x; public void foo() { int current = x; x = current + 1; } public void go() { for(int i=0;i<5;i++) { new Thread() { public void run() { foo(); System.out.print(x + “, “); } }.start(); }}} 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() {.
Change the variable declaration on line 3 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 }.
查看答案
()是主传动装置中不可缺少的部件。
A. 齿轮座
B. 减速器
C. 连接轴
D. 以上答案都不对
治疗饮食积滞型腹痛当选用的方剂是()
A. 良附丸
B. 枳实导滞丸
C. 柴胡疏肝散
D. 小建中汤
E. 大承气汤