Question
Given the code. What will be the result?
public class Test implements Runnable{
public static void main(String[] args) throws InterruptedException{
Thread a = new Thread(new Test());
a.start();
System.out.print("Begin");
a.join();
System.out.print("End");
}
public void run(){
System.out.print("Run");
}
}
public class Test implements Runnable{
public static void main(String[] args) throws InterruptedException{
Thread a = new Thread(new Test());
a.start();
System.out.print("Begin");
a.join();
System.out.print("End");
}
public void run(){
System.out.print("Run");
}
}
Answer: Option C
Submit Your Solution Below and Earn Points !
Submit Your Solution Below and Earn Points !
More Questions on This Topic :
Question 1.
Which statement is true?
....
Question 3.
Which two statements are true? 1. Deadlock ....
Question 4.
Which statement is true?
....
Question 6.
Which statement is true?
....
Submit Solution