Java thread MCQ - Quiz

  • 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.
  • A Extending the thread class.
  • B Implementing Runnable interface.
  • C Both of the above
  • D None of these
  • A The program does not compile because this cannot be referenced in a static method.
  • B The program compiles fine, but it does not print anything because t does not invoke the run() method
  • C The program compiles and runs fine and displays test on the console.
  • D None of the above