Sail E0 Webinar
Question
What will be output of the following program code?
public class Test implements Runnable{
public void run(){
System.out.print("go");
}
public static void main(String arg[]) {
Thread t = new Thread(new Test());
t.run();
t.run();
t.start();
}
}
Options:
A .  Compilation fails.
B .  An exception is thrown at runtime.
C .  "go" is printed
D .  "gogogo" is printed
E .  "gogo" is printed
Answer: Option D

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers