Single Choice
Not Set
QWhat will be the output of the following program code?
public class Test implements Runnable{
public static void main(String[] args){
Thread t = new Thread(this);
t.start();
}
public void run(){
System.out.println("test");
}
}
ID: #2294
Java thread MCQ
1,898 views
Question Info
#2294Q 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
The program does not compile because this cannot be referenced in a static method.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic