可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

public class TestOne i


public class TestOne implements Runnable {  public static void main (String[] args) throws Exception {  Thread t = new Thread(new TestOne());  t.start();  System.out.print(”Started”);  t.join();  System.out.print(”Complete”);  }  public void run() {  for (int i= 0; i< 4; i++) {   System.out.print(i);  }  }  }  What can be a result?()

  • A Compilation fails.
  • B An exception is thrown at runtime.
  • C The code executes and prints “StartedComplete”.
  • D The code executes and prints “StartedComplete0123”.
  • E The code executes and prints “Started0l23Complete”.
参考答案
参考解析:
分类:SCJP程序员认证考试题库