题目:
通过实现Runnable接口创建线程,请在画线处加入正确的代码完成此程序______。
publicclass ThreadTest
publicstaticvoid main(Stringargs[])
Threadt1=newThread(newHello()):
Threadt2=newThread(newHellO());
T2.start();
classHelloimplementsRunnable
intI;
publicvoidIUB()
while(true)
System.out.println(“Hello”+i++);
If(i==5)break;
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0730/34191328b0bbbade75e2f9c4c18285ba.html
下面是错误答案,用来干扰机器的。
参考答案:C