下列程序的功能是在监控台上每隔一秒钟显示一个字符串"Hello!",能够填写在程序中下划线位置,使程序完整并能正确运行的语句是publicclassTestimplementsRunnable{publicstaticvoidmain(Stringargs[]){Testt=newTest();Threadtt=newThread(t);tt.start();}publicvoidrun(){for(;;){try{}catchL______e){}System.out.println("Hello");}}}A.B.C.D.

下列程序的功能是在监控台上每隔一秒钟显示一个字符串"Hello!",能够填写在程序中下划线位置,使程序完整并能正确运行的语句是

publicclassTestimplementsRunnable{

publicstaticvoidmain(Stringargs[]){

Testt=newTest();

Threadtt=newThread(t);

tt.start();

}

publicvoidrun(){

for(;;){

try{

}catchL______e){}

System.out.println("Hello");

}

}

}

A.

B.

C.

D.


相关考题:

下列程序的功能是在监控台上每隔一秒钟显示一个字符串"Hello",能够填写在程序中横线位置,使程序完整并能正确运行的语句是( )。 public class Test implements Runnable { public static void main (String[ ] args ) { Test t =new Test( ); Thread tt= new Thread(t); tt. start( ); public void run ( ) { for(; ; ){ try { __________; } catch (__________ e ) { } System. out. println (" Hello" ); } } }A.sleep(1000); InterruptedExceptionB.t. sleep(1000); InterruptedExceptionC.Thread. sleep(1000); RuntimeExceptionD.Thread. sleep(1000); InterruptedException

下列程序的功能是在监控台上每隔一秒钟显示一个字符串“你好!”,能够填写在程序中画线位置,使程序完整并能正确运行的语句是 public class Exam implements Runnable{ public static void main(String args[]){ Exam t=new Exam(); Thread tt=new Thread(t); tt.start(); } public void run(){ for(;;){ try{ ; }catch(e){} System.out.println("你好!"); } } }A.sleep(1) RuntimeExceptionB.t.sleep(1000) InterruptedExceptionC.Thread.sleep(1) InterruptedExceptionD.Thread.sleep(1000) InterruptedException

下列程序的功能是创建一个显示5个“Hello!”的线程并启动运行,试将程序补充完整。public class ThreadTest extends Thread{public static void main(String args[ ]){ThreadTest t=new______;t.start( );}public void run( ){int i=0;while(true){System.out.println("Hello!");if(i++==4)break;}}

下列程序的功能是在监控台上每隔一秒钟显示一个字符串”Hello!”,能够填写在程序中下画线位置,使程序完整并能正确运行的语句是( )。 public class Test implements Runnable{ public static void main(String args[]){ Test t=new Test: Threadt t=new Thread(t); tt.start: } public void run{ for(;;){ try{ ; }catch(e){} System.out.println("Hello"); } } }A.sleep(1000)B.t.sleep(1000)InterruptedExceptionInterruptedExceptionC.Thread.sleep(1000)D.Thread.sleep(1000)RuntimeExceptionInterruptedException

下列程序的功能是在监控台上每隔一秒钟显示一个字符串“Hello!”,能够填写在程序中下划线位置,使程序完整并能正确运行的语句是public class Test implements Runnable{ public static void main(String args[]){ Test t=new Test(); Thread tt=new Thread(t); tt.start(); } public void run(){ for(;;){ try{ ; }catch( e){} System.out.println("Hello"); } } }A.sleep(1000)B.t.sleep(1000)InteruptedException InterruptedExceptionC.Thread.sleep(1000)D.Thread.sleep(1000)RuntimeException InterruptedException

要下列Java Applet程序完整并能够正确运行,横线处应填入的内容是( )。 A.extends Thread 要下列Java Applet程序完整并能够正确运行,横线处应填入的内容是( )。A.extends ThreadB.extends AppletC.extends CharD.extends Float

下列程序的功能是在监控台上每隔-秒钟显示-个字符串”Hello!¨,能够填写在程序中下画线位置,使程序完整并能正确运行的语句是( )。A.sleep(1000)B.t. sleep(1000) InterruptedExceptionInterruptedExceptionC.Thread. sleep(1000)D.Thread. sleep(1000) RuntimeExceptionlnterruptedException

在下列Java Applet程序的下划线处填入代码,使程序三整并能够正确运行。importjava.applet.*;importjava.awt.*;publicclassHelloWofil______{publicvoidpaint(Graphicsg){g.drawstring("HelloWorld!",25,25);}}

( 15 )在下列 Java Applet 程序的下划线处填入代码,使程序完整并能够正确运行。import java.applet.*;import java.awt.*;public class HelloWorld 【 15 】 {public void paint(Graphics g){g.drawString( " Hello World! " ,25,25);}}