【单选题】请看下面未完成的代码 public class Foo implements Runnable { public void run (Threa
已帮助 人
【单选题】请看下面未完成的代码 public class Foo implements Runnable { public void run (Thread t) { System.out.println("Running."); } public static void main (String[] args) { new Thread(new Foo()).start(); } } 结果是?
A.运行时抛出一个异常
B.程序能够运行,但是没有任何输出
C.没有实现 Runnable 接口中的方法导致编译错误
D.程序运行后输出“Running”

回答
共1条回复-
A
