当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

运行下列程序 会产生什么结果?()public class X exlends Thread implements Runable{public void


运行下列程序,会产生什么结果? () public class X exlends Thread implements Runable{ public void run(){ System.out.println("this is run()"); } public static void main(String args[]) Thread t=new Thread(new X()); t.start(); } }

A.第一行会产生编译错误

B.第五行会产生编译错误

C.第六行会产生运行错误

D.程序会运行和启动

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • 下列程序的运行结果是 #include classA { inta; public: A(){a=0;} A(intas) { a=as; c

  • 下列程序的运行结果为 #include inti=0; classA{ public: A()}i++;} }; voidmain() { A

  • 运行下列程序,会产生什么结果publicclassXextendsThreadimplementsRunable{publicvoidrun(){" />