🎴 Flashcard Mode

Java Multithreading and Exception Handling

Card1 / 28
Mastered0
Review0
QuestionClick to flip

Which of the following methods is/are correct for making a new thread?
A. Declare a class to be a subclass of Thread class.
B. Declare a class that implements the Runnable class.

AnswerClick to flip back
A
Only A
💡 Explanation:

We can create a new thread using two ways:

  1. Declare a class to be a subclass of Thread class.
  2. Declare a class that implements the Runnable interface.
Change Mode