[填空題] 下列程序創(chuàng)建了一個線程并運行,請?zhí)羁?,使程序完整? public class ThreadTest { public static void
2021-07-20
[填空題] 下列程序創(chuàng)建了一個線程并運行,請?zhí)羁眨钩绦蛲暾? public class ThreadTest { public static void main(String args[]){ Hello h=new Hello(); 【12】 ; t.start(); } } class Hello implements Runnable { int i; public void run() {while(tree){ System.out.println("Hello" +i++); if(i==5) break; } } }
正確答案:Thread t=new Thread(h)
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。