问题
填空题
请在下画线处填入代码,使程序正常运行并且输出“Hello!”
class Test______
public static void main(string[]args)
Test t=new Test();
t.start();
Public void run()
System.out.println(’Hello!’);
答案
参考答案:exlends Thread
解析: 从后面重写了run()方法来看,这是通过继承Thread类,并重写run()方法定义线程体,然后创建该子类的对象的方式来创建线程。