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();
}
}
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();
}
}
Answer: Option D
Submit Your Solution Below and Earn Points !
Submit Your Solution Below and Earn Points !
More Questions on This Topic :
Question 2.
Which statement is true?
....
Question 4.
Which two statements are true? 1. Deadlock ....
Question 5.
Which statement is true?
....
Question 7.
Which statement is true?
....
Submit Solution