单项选择题

下列程序的运行结果是______。
public class Test extends Thread{
public static void main(String[] args){
Thread t=new Thread();
t.start();
}
public void run(){
System.out.println("Hello");
}
}

A.程序不能通过编译,因为没有import语句将Thread类引入
B.程序不能通过编译,因为Test类没有实现Runnable接口
C.程序通过编译,且运行正常,没有任何输出
D.程序通过编译,且运行正常,打印出一个“HeIlo”
题目列表

你可能感兴趣的试题

微信扫码免费搜题