A-A+

阅读下面程序 public class Test implements Runnable {

2022-08-05 20:08:36 问答库 阅读 171 次

问题详情

阅读下面程序 public class Test implements Runnable { public static void main(String[] args) { ______ t.start(); } public void run() { System.out.println("Hello!"); } } 程序中下画线处应填入的正确选项是
A.Test t=new Test();
B.Thread t=new Thread();
C.Thread t=new Thread(new Test());
D.Test t=new Thread();请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:C

考点:程序