单选题2. public class Foo implements Runnable ( 3. public void run (Thread t) { 4. system.out.printIn(“Running.”); 5. } 6. public static void main (String[] args) { 7. new thread (new Foo()).start(); 8. ) 9. ) What is the result?()AAn exception is t
题目
单选题
2. public class Foo implements Runnable ( 3. public void run (Thread t) { 4. system.out.printIn(“Running.”); 5. } 6. public static void main (String[] args) { 7. new thread (new Foo()).start(); 8. ) 9. ) 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.
相似考题