题目内容

下列程序的创建了一个线程并运行,请填空,使程序完整。public class ThreadTest{public static void main(String args[]){Hello h=new Hello();____;t.start();}}class Hello implements Runnable{int i;public void run(){while(true){System.out.println("Hello"+i++);if(i==5) break;}}}

查看答案
更多问题

关于下列程序的功能,说法正确的是public class ko10_1 extends Thread{int n;ko10_1(){Thread td=new Thread(this);td.start();}public void run(){for (n=0;n<6;n++){try{System.out.print(n);Thread.sleep(500);}catch(InterruptedException e){ System.out.println("Exception"); }}}public static void main(String args[]){new ko10_1();}}

A. 这段程序的功能是:每隔500秒打印012345
B. 这段程序的功能是:每隔1秒打印012345
C. 这段程序的功能是:每隔半秒打印012345
D. 这段程序的功能是:每隔半分钟打印012345

使比其自身优先级低的线程运行的Thread类的方法是:A、sleep()B、yiele()C、join()D、interrupt()

A. sleep()
B. yiele()
C. join()
D. interrupt()

[音频]

A. Yes, I do.
B. No, I don't.
C. Yes, that'll be all right.
D. No problem.

[音频]Nowadays you don't have to go to the theatre or own electronic devices like TVs or DVD players to watch movies. People can watch movies on hundreds of online movie websites. Usually you will have to (1) some fee to find all the latest movies you want at that website. Because of the (2) competition between online movie websites, you can actually get online movies for (3) at many movie websites. Searching these kinds of free movie websites is not at all difficult. Just include the word "free" before the movie name in any good (4) engine and it will instantly take you there.

答案查题题库