题目
[填空题]通过实现Runnable接口创建线程,请在画线处加入正确的代码完成此程序【9】。publicclassThreadTest{publicstaticvoidmain(Stringargs[]){Threadt1=newThread(newHello());Threadt2=newThread(newHello());______;t2.start();}}classHelloimplementsRunnable{inti;publicvoidrun(){while(true){System.out.println("Hello"+i++);if(i==5)break;}}}
提示:未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。
答案
查看答案
搜题