中国大学MOOC: 如果使用Thread t=new Test()语句创建一个线程,则下列叙述中正确的是________。
举一反三
- 如果使用Thread t=new Test()语句创建一个线程,则下列叙述正确的是 A: Test类一定要实现Runnable接口 B: Test类一定是Thread类的子类 C: Test类一定是Runnable类的子类 D: Test类一定是继承Thread类,并且实现Runnable接口
- 当使用SomeThread t=new SomeThread()创建一个线程时,下列叙述中正确的是:
- 创建一个线程并让它处于可运行状态的语句是_ Thread A=new Thread(); A.start A: 正确 B: 错误
- 创建一个线程并让它处于可运行状态的语句是_ Thread A=new Thread(); A.start
- 下列程序的功能是在监控台上每一秒种显示一个字符串“Hello!”,能够填写在线程中下划线位置,使程序完整并能正确运行的语句是 public class Test implements Runnable{ public static void main(String args[]){ Test t=new Test(); Thread tt=new Thread(t); tt.start(); }