单选题
阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ _______________________________________; t. start(); } public void mR(){ System. out. println("Hello!"); } } 在程序下画线处填入正确选项是
A、
Test t=flew Test()
B、
Thread t=new Thread();
C、
Thread t=new Thread(new Test());
D、
Test t=new Thread();
【正确答案】
C
【答案解析】
[解析] 根据t. start()可知t应该是一个Thread类,排除A)。Thread类与Test类之间没有继承关系,所以排除D)。B)没有指定创建线程的对象,因此t. start()语句不能使Test类的run方法运行。所以选C)。
提交答案
关闭