问题
单项选择题
下列程序的执行结果是______。class A1 implements Runnable { public void run() { for(iht i = 0; i < 10; i++) { System.out.println("i =" + i); if(i == 3) break; } }}public class ex38{ public static void main(String[] args) { Thread th1 = new Thread(new A1()); th1.start (); } }
A.i=1 i=2 i=3 i=4
B.i=1 i=1 i=1 i=1
C.i=0 i=1 i=2 i=3
D.i=1 i=2 i=3
答案
参考答案:C