阿摩線上測驗 登入

試題詳解

試卷:無年度 - SCJP 6.0 認證教戰手冊第二版 SCJP 6.0 認證教戰手冊第二版 認證教戰手冊第二版_題庫 201-244#83084 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:無年度 - SCJP 6.0 認證教戰手冊第二版 SCJP 6.0 認證教戰手冊第二版 認證教戰手冊第二版_題庫 201-244#83084

科目:OJCP(SCJP)

複選題
229 
5e4e16fcccfdc.jpg
Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ? (Choose two.)
(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}
正確答案:登入後查看