当前位置:百科知识 > CMS专题G

问题描述:

[单选] class MyThread implements Runnable { 2. public void run(){ 3. System.out.print("go "); 4. } 5. 6. public static void main(String [] args){ 7. // insert code here 8. t.start(); 9. } 10. } 和如下四句: Thread t = new MyThread(); MyThread t = new MyThread(); Thread t = new Thread(new Thread()); Thread t = new Thread(new MyThread()); 分别插入到第5行,有几个可以通过编译?
A.0 B.1 C.2 D.3
参考答案:查看
答案解析:
☆收藏

随机题目