MCQ
Single Best Answer
Not Set
QPredict the output:
class A implements Runnable{
public void run(){
try{
for(int i=0;i<4;i++){
Thread.sleep(100);
System.out.println(Thread.currentThread().getName());
}
}catch(InterruptedException e){
}
}
}
public class Test{
public static void main(String argv[]) throws Exception{
A a = new A();
Thread t = new Thread(a, "A");
Thread t1 = new Thread(a, "B");
t.start();
t.join();
t1.start();
}
}
ID: #2301
Java thread MCQ
980 views
Question Info
#2301Q ID
Not SetDifficulty
Java thread MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option A
Explanation
A A A A B B B B
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic