MCQ: How many threads can be executed at a time?



How many threads can be executed at a time?

  1. Only one thread
  2. Multiple threads
  3. Only main (main() method) thread
  4. Two threads

Answer

b. Multiple threads

Explanation:

In Java, multiple threads can be executed at the same time. A Java standalone application always starts with a single thread known as the main thread that is associated with the main() method.

In the operating system, only one thread is executed at a time.

Hence, the correct answer is an option (b).

Free Spring Boot Tutorial - 5 Hours Full Course


Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course

Comments