[单选题]

阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ _______________________________________; t. start(); } public void mR(){ System. out. println("Hello!"); }} 在程序下画线处填入正确选项是

A.Test t=flew Test()

B.Thread t=new Thread();

C.Thread t=new Thread(new Test());

D.Test t=new Thread();

参考答案与解析:

相关试题

阅读下面程序public class Test implements Runna

[单选题]阅读下面程序 public class Test implements Runnable { public static void main(String[] args) { ______ t.start(); } public void run() { System.out.println("Hello!"); } } 程序中下画线处应填入的正确选项是A.Test t=new Test();B.Thread t=new Thread();C.Thread t=new Thread(new

  • 查看答案
  • 阅读下面程序public class Test implements Runna

    [单选题]阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ _______________________________________; t. start(); } public void mR(){ System. out. println("Hello!"); }} 在程序下画线处填入正确选项是A.Test t=flew Test()B.Thread t=new Th

  • 查看答案
  • 阅读下面程序public class Test implements Runna

    [单选题]阅读下面程序 public class Test implements Runnable { private int x=0; private int y=0; boolean flag=true; public static void main(String[]args) { Test r=new Test(); Thread t1=new Thread(r); Thread t2=new Thread(r); t1.start(); t2.start(); } public void run

  • 查看答案
  • 阅读下面代码public class Test implements Runna

    [单选题]阅读下面代码 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.程

  • 查看答案
  • 阅读下列代码public class Test implements Runna

    [单选题]阅读下列代码 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.程

  • 查看答案
  • ( 18 )阅读下列程序Public class Test implements

    [单选题]( 18 )阅读下列程序Public class Test implements Runnable{Private int x=0;Private int y=o;boolean flag=true;Public static void main(string[ ] args) {Test r =new Test( );Thead t1=new Thead(r);Thead t2=new Thead(r);t1.start( );t2.start( );}Public void run(){Wh

  • 查看答案
  • 阅读下面程序class Test implements Runnable{pub

    [单选题]阅读下面程序class Test implements Runnable{public static void main(String[] args){Test t = new Test();t.start();}public void run(){ }}下列关于上述程序的叙述正确的是A.) 程序不能通过编译,因为 start() 方法在 Test 类中没有定义B.) 程序编译通过,但运行时出错,提示 start() 方法没有定义C.) 程序不能通过编译,因为 run() 方法没有定义方法体D.

  • 查看答案
  • 阅读下面程序class Test implements Runnable {pu

    [单选题]阅读下面程序 class Test implements Runnable { public static void main(String[] args) { Test t = new Test(); t.startO; } public void run(){ } } 下列关于上述程序的叙述正确的是A.程序不能通过编译,因为start()方法在Test类中没有定义B.程序编译通过,但运行时出错,提示start()方法没有定义C.程序不能通过编译,因为run()方法没有定义方法体D.程序编译通

  • 查看答案
  • 阅读下面程序class Test implements Runnable { p

    [单选题]阅读下面程序 class Test implements Runnable { public static void main(String[] args) { Test t=new Test(); t.start(): } public void run() {} } 下列关于上述程序的叙述正确的是A.程序不能通过编译,因为start()方法在Test类中没有定义B.程序编译通过,但运行时出错,提示start()方法没有定义C.程序不能通过编译,因为run()方法没有定义方法体D.程序编译通过

  • 查看答案
  • 阅读下面程序class Test implements Runnable {pu

    [单选题]阅读下面程序 class Test implements Runnable { public static void main(String[] args) { Test t = new Test(); t.startO; } public void run(){ } } 下列关于上述程序的叙述正确的是A.程序不能通过编译,因为start()方法在Test类中没有定义B.程序编译通过,但运行时出错,提示start()方法没有定义C.程序不能通过编译,因为run()方法没有定义方法体D.程序编译通

  • 查看答案
  • 阅读下面程序public class Test implements Runna