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 .  "go" is printed
C .  "gogo" is printed
D .  An exception is thrown at runtime.
E .  "gogogo" is printed
Answer: Option E

Submit Your Solution Below and Earn Points !

Submit Solution

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

Latest Videos

Latest Test Papers