MCQ Single Best Answer Not Set

QAnalyze the following code:
public class Test implements Runnable{
        public static void main(String[] args){
                Test t = new Test();
                t.start();
        }

        public void run() { }
}

ID: #2300 Java thread MCQ 845 views
Question Info
#2300Q ID
Not SetDifficulty
Java thread MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A The program does not compile because the start() method is not defined in the Test class.
  • B The program compiles, but it does not run because the start() method is not defined.
  • C The program compiles, but it does not run because the run() method is not implemented.
  • D The program compiles and runs fine.
Correct Answer: Option A

Explanation

The program does not compile because the start() method is not defined in the Test class.

Share This Question

Challenge a friend or share with your study group.