下列程序的功能是在监控台上每隔一秒钟显示一个字符串”Hello!”,能够填写在程序中下画线位置,使程
A.sleep(1000)
B.t.sleep(1000)InterruptedExceptionInterruptedException
C.Thread.sleep(1000)
D.Thread.sleep(1000)RuntimeExceptionInterruptedException
A.sleep(1000)
B.t.sleep(1000)InterruptedExceptionInterruptedException
C.Thread.sleep(1000)
D.Thread.sleep(1000)RuntimeExceptionInterruptedException
:A.sleep(1000)InterruptedException
B.t.sleep(1000)InterruptedException
C.Thread.sleep(1000)RuntimeException
D.Thread.sleep(1000)InterruptedException
A.sleep(1000)InterruptedException
B.t.sleep(1000)lntermptedException
C.Thread.sleep(1000)RuntimeException
D.Thread.sleep(1000)InterruptedExcepfion
A.sleep(1000) InterruptedException
B.t.sleep(1000) InterruptedException
C.Thread.sleep(1000) RuntimeException
D.Thread.sleep(1000) InterruptedException
A.sleep(1000)
B.t.sleep(1000)InteruptedException InterruptedException
C.Thread.sleep(1000)
D.Thread.sleep(1000)RuntimeException InterruptedException
A.sleep(1) RuntimeException
B.t.sleep(1000) InterruptedException
C.Thread.sleep(1) InterruptedException
D.Thread.sleep(1000) InterruptedException
A.sleep(1) RuntimeException
B.t.sleep(1000) InterruptedException
C.Thread.sleep(1) InterruptedException
D.Thread.sleep(1000) InterruptedException
A.sleep(1000); InterruptedException
B.t. sleep(1000); InterruptedException
C.Thread. sleep(1000); RuntimeException
D.Thread. sleep(1000); InterruptedException
下面程序的功能在监控台上每隔一秒钟显示一个字符串"Hello!"。
public class Class31 implements Runnable
{
public static void main(String args[])
{
Class31 t=new Class31();
Thread tt=new Thread(t);
tt.start();
}
public void run()
{
for(;;)
{
try{
();
}catch(()){}
System.out.println("Hello");
}
}
}
下列程序的功能是每隔一秒钟输出一个字符串“Hello!”。
publicclassC3101implementsRunnable
{
publicstaticvoidmain(Stringargs[])
{
C3101t=newC3101();
Threadtt=newThread(t);
tt.start();
}
publicvoidrun()
{
for(;;)
{
try{
();
}catch(()){}
System.out.println("Hello");
}
}
}
A.Enabled
B.Visible
C.Interval
D.Timer
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!