试题详情
单项选择题 class ThreadBoth extends Thread implements Runnable {  public void run(){ System.out.print("hi "); }  public static void main(String [] args){  Thread t1 = new ThreadBoth();   Thread t2 = new Thread(t1);  t1.run();  t2.run();  }  }  结果为:() 

A、hi

B、hi hi

C、编译失败

D、代码运行,但无输出结果

  • B
  • 关注下方微信公众号,在线模考后查看

热门试题