多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

public class Foo implements Runnable (  public void run (Thread t) {   system.out.printIn(“Running.”);   }   public static void main (String args) {   new thread (new Foo()).start();   }   )   What is the result?()  

  • A、 An exception is thrown.
  • B、 The program exists without printing anything.
  • C、 An error at line 1 causes compilation to fail.
  • D、 An error at line 6 causes the compilation to fail.
  • E、 “Running” is printed and the program exits.
正确答案:C
答案解析:
进入题库查看解析

微信扫一扫手机做题