Single Choice
Not Set
QWhat will happen after compiling and running following code?
class A implements Runnable{
public void run(){
System.out.println("run-a");
}
}
1. public class Test{
2. public static void main(String... args){
3. A a = new A();
4. Thread t = new Thread(a);
5. t.start();
6. t.start();
7. }
8. }
ID: #2296
Java thread MCQ
1,450 views
Question Info
#2296Q 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
Compilation succeed but Runtime Exception
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic