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

阅读下列代码public class Test implements Runnable{public void run(Thread t){System. out. p


阅读下列代码 public class Test implements Runnable{ public void run(Thread t){ System. out. println("Running. "); } public static void main(String[]args){ Thread tt=new Thread(new Test()); tt. start(); } } 代码运行结果是

A.将抛出一个异常

B.没有输出并正常结束

C.输出“Running”并正常结束

D.程序第2行将出现一个编译错误

参考答案
您可能感兴趣的试题
  • 下列代码的执行结果是()public class Test2{public static void main(String args[]){int a=4 b=

  • 下列代码的执行结果是()。 public class Test{ public int aMethod( ){ static int i=0; i++;

  • 下列代码中 将引起一个编译错误的行是()。1)public class Test{2)int m n;3)public Test(){}4)pub

  • 下列代码的执行结果是 public class Test{ public int aMethod( ) { static int i=0;

  • 下列代码中 将引起一个编译错误的行是1)public class Test{2) int m n;3)public Test(){}4)publi

  • 下列代码中 将引起一个编译错误的行是( )。 1)public class Test{ 2)int m n; 3)public Test