Given a sample code:
public class Test implements Runnable {
public void run() {
System.out.print("run");
}
public static void main(String[] args) {
Runnable r = new Test();
Thread t = new Thread(r);
t.run();
t.start();
t.run();
}
}
Which of the following statement is correct ?
(A) Compilation fails.
(B) Print "run run run"
(C) An exception is thrown at runtime.
(D) Print "run"
(B)