问题:
class Order3 implements Runnable {
public static void main(String [] args) {
new Thread(new Order3()).start();
for(int x = 0; x 〈 10; x++) System.out.print("m");
}
public void run() {
for(int x = 0; x 〈 10; x++) {
//insert code here
System.out.print("r");
}
}
}
和:
当代码被编译并照此运行时产生 "before" 的输出, 当下列内容插入到代码第8行时产生"after"输出
if (x 〉 3 && x 〈 7) Thread.yield();
对比“before”的输出结果和“after”的输出结果,下面哪一项是正确的?()
A . 输出字符的总数可能改变。
B . 当添加额外的代码时,编译将失败。
C . 在“after”输出结果中,字符“m”较早出现的可能性较小。
D . 在“after”输出结果中,字符“m”较早出现的可能性较大。
class Order3 implements Runnable {
public static void main(String [] args) {
new Thread(new Order3()).start();
for(int x = 0; x 〈 10; x++) System.out.print("m");
}
public void run() {
for(int x = 0; x 〈 10; x++) {
//insert code here
System.out.print("r");
}
}
}
和:
当代码被编译并照此运行时产生 "before" 的输出, 当下列内容插入到代码第8行时产生"after"输出
if (x 〉 3 && x 〈 7) Thread.yield();
对比“before”的输出结果和“after”的输出结果,下面哪一项是正确的?()
● 参考解析
本题暂无解析