下列程序的功能是在监控台上每隔一秒钟显示一个字符串“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

下列程序的功能是在监控台上每隔一秒钟显示一个字符串“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 InterruptedException

C.Thread.sleep(1000)

D.Thread.sleep(1000)RuntimeException InterruptedException


相关考题:

下列程序的功能是在监控台上每隔一秒钟显示一个字符串"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

下列程序的功能是在监控台上每隔一秒钟显示一个字符串”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

下列给定程序的功能是:从键盘输入若干行字符串(每行不超过80个字符),写入文件myfile4.txt中,用一1作字符串输入结束的标志,然后将文件的内容显示在屏幕上。文件的读写分别由函数Readrext和Write-.Text实现。请在程序的下划线处填人正确的内容并将下划线删除,使程序得出正确的结果。注意:部分源程序在文件BLANKl.C中.不得增行或删行,也不得更改程序的结构!

下列给定程序中,函数fun的功能是:从形参SS所指字符串数组中,删除所有串长超过k的字符串,函数 返回剩余字符串的个数。ss所指字符串数组中共有N个字符串,且串长小于M。请在程序的下划线处填入正确的内容并将下划线删除,使程序得出正确的结果。注意:部分源程序在文件BLANKl.C中。不得增行或删行.也不得更改程序的结构!

下列给定程序中,函数fun的功能是:在形参SS所指字符串数组中查找与形参t所指字符串相同的串,找到后返回该串在字符串数组中的位置(即下标值),若未找到则返回一1。SS所指字符串数组中共有N个内容不同的字符串,且串长小于M。请在程序的下划线处填入正确的内容并将下划线删除,使程序得出正确的结果。注意:部分源程序在文件BLANKl.C中。不得增行或删行,也不得更改程序的结构!

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

下列给定程序中,函数6m的功能是:将形参S所指字符串中下标为奇数的字符取出。并按ASCIl码大小递增排序,将排序后的字符存入形参P所指的字符数组中,形成一个新串。例如。形参8所指的字符串为“baawrskjghzlicda”,执行后P所指字符数组中的字符串应为“aachjl。w”。请在下划线处填入正确的内容并将下划线删除。使程序得出正确的结果。注意:部分源程序给出如下。 ’不得增行或删行,也不得更改程序的结构!试题程序:

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