[单选题]阅读下列的程序public class Demo extends Thread implements Runnable{ -----①public void run(){ System.out.println("this is run()");}public static void main(String args[]){ Thread thread=new Thread(new Demo()); -----② thread.start();}}下列关于程序运行结果的说法中,正确的是( )
广开题库
|
2023-11-01 15:18:41
|
14
[单选题]阅读下列的程序public class Demo extends Thread implements Runnable{ -----①public void run(){ System.out.println("this is run()");}public static void main(String args[]){ Thread thread=new Thread(new Demo()); -----② thread.start();}}下列关于程序运行结果的说法中,正确的是( )

A.①行出现编译错误
B.②行出现编译错误
C.出现运行错误
D.程序正常执行输出this is run()
查看答案

广东开放大学

形成性考核

您可能感兴趣的试题
TOP