在程序的下画线处应填入的选项是 ( )。 public class Test ________{ public static void mai n(Stri ng args[]){ Test t =ne w Test(); Thread tt

admin2012-12-02  54

问题 在程序的下画线处应填入的选项是
(  )。
public class Test ________{
public static void mai n(Stri ng args[]){
  Test t =ne w Test();
  Thread tt =ne w Thread(t);
   tt .start(); }
public void run(){
  for(i nt i =0;i <5;i ++){
   Syste m.out .pri ntln("i ="+i);
  }


选项 A、i mple ments Runnable
B、extends Thread
C、i mple ments Thread
D、extends Runnable

答案A

解析 Test 类实现了Runnable 接口。
转载请注明原文地址:https://kaotiyun.com/show/E9ID777K
0

最新回复(0)