题目

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 }

提示:未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。
答案
查看答案
相关试题

An administrator wants to mirror an important filesystem between two disks without mirroring the entire volume group. Which command should be used?()

A、cplv

B、mirrorvg

C、mklvcopy

D、migratelv

在1785~1805MHz有我国拥有自主知识产权的移动通信系统,这个系统是()。

DRAG DROP Click the Task button.

若有以下程序#include #include #include typedef struct stu{ char *name,gender; int score;}STU;void f(char *p){ p=(char *)malloc(10); strcpy(p,"Qian");}main(){ STU a={NULL,'m',290},b; a.name=(char *)malloc(10); strcpy(a.name,"Zhao"); b=a; f(b.name); b.gender='f'; b.score=350; printf("%s,%c,%d,", a.name, a.gender, a.score); printf("%s,%c,%d", b.name, b.gender, b.score);}则程序的输出结果是(  )。

A、Qian,m,290,Qian,f,350

B、Zhao,m,290,Qian,f,350

C、Qian,f,350,Qian,t,350

D、Zhao,m,290,Zhao,f,350

Given: What is the result when the programmer attempts to compile the code and run it with the command java Converter 12?()

A、 It is true that j==i.

B、 It is false that j==i.

C、 An exception is thrown at runtime.

D、 Compilation fails because of an error in line 13.

联系我们 会员中心
返回顶部