Single Choice
Not Set
QWhat will be the output after compiling and executing the following code?
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");
}
}
ID: #2306
Java thread MCQ
926 views
Question Info
#2306Q ID
Not SetDifficulty
Java thread MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
"BeginRunEnd" is printed.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic