欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > Java认证考试 > SCJP程序员认证考试

多项选择题

public class Threads 1 { 
intx=0; 
public class Runner implements Runnable { 
public void run() { 
int current = 0; 
for(int=i=0;i<4;i++){ 
current = x; 
System.out.print(current + “, “); 
x = current + 2; 
} 
} 
} 
public static void main(String[] args) { 
new Threads1().go(); 
} 
public void go() { 
Runnable r1 = new Runner(); 
new Thread(r1).start(); 
new Thread(r1 ).start(); 
} 
} 
Which two are possible results?()

    A. 0, 2, 4, 4, 6, 8, 10, 6,
    B. 0, 2, 4, 6, 8, 10, 2, 4,
    C. 0, 2, 4, 6, 8, 10, 12, 14,
    D. 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14,
    E. 0, 2, 4, 6, 8, 10, 12, 14, 0, 2, 4, 6, 8, 10, 12, 14,

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题