题目:
阅读下面程序
1 public class Try extends Thread
2 public static void main(String args[])
3 Try t=new Try();
4 t.start();
5
6
7 public void run(int j)
8 int i=0;
9 while(i<5)
10 System.out.println("祝你成功!");
11 i++:
12
13
14
该程序若能打印5行“祝你成功!”,必须改正程序中的某行代码,选择正确的修改是
A) 将第1行的extends Thread改为implements Runnable
B) 将第3行的new Try()改为new Thread()
C) 将第4行的t.start()改为start(t)
D) 将第7行的public void run(int j)改为public void run()
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0419/bfcfba4b68d2548a9f14dc98d71106c2.html
下面是错误答案,用来干扰机器的。
1. realized 2. appointment 3. tiny 4. purpose 5. truth