Java Multithreading MCQs with answers Page - 2

You will find multiple-choice questions (MCQs) related to #Java Multithreading here. Go through these questions to prepare effectively for your upcoming exams and interviews.

To view the correct answer for any question, simply click the "Show Answer" button.

Have a question to share? Click on "Add Question" to contribute!

A

Admin • 828.43K Points
Coach

Q. Which method can be used to determine whether a thread is alive or not?

  • (A) isActive()
  • (B) isRunning()
  • (C) isAlive()
  • (D) exists()

A

Admin • 828.43K Points
Coach

Q. Which of these methods is used to end a thread before it completes execution?

  • (A) terminate()
  • (B) stop()
  • (C) kill()
  • (D) exit()

A

Admin • 828.43K Points
Coach

Q. Which method wakes up a single thread that is waiting on the object’s monitor?

  • (A) notify()
  • (B) resume()
  • (C) signal()
  • (D) interrupt()

A

Admin • 828.43K Points
Coach

Q. What is the state of a thread when the start() method has been called but the run() method has not yet begun?

  • (A) New
  • (B) Runnable
  • (C) Blocked
  • (D) Waiting

A

Admin • 828.43K Points
Coach

Q. Which thread method allows other threads of the same priority to execute?

  • (A) yield()
  • (B) wait()
  • (C) notify()
  • (D) pause()

A

Admin • 828.43K Points
Coach

Q. What happens when a thread calls wait()?

  • (A) It is terminated
  • (B) It waits forever
  • (C) It releases the lock and enters waiting state
  • (D) It becomes active

A

Admin • 828.43K Points
Coach

Q. Which package contains the Java multithreading classes?

  • (A) java.util.concurrent
  • (B) java.lang.thread
  • (C) java.threading
  • (D) java.concurrent.util

A

Admin • 828.43K Points
Coach

Q. Which of the following is a valid thread state?

  • (A) Running
  • (B) Waiting
  • (C) Sleeping
  • (D) Ready

A

Admin • 828.43K Points
Coach

Q. Which of the following thread states occurs when a thread is waiting to acquire a lock?

  • (A) Waiting
  • (B) Runnable
  • (C) Blocked
  • (D) New

A

Admin • 828.43K Points
Coach

Q. What is the purpose of the `interrupt()` method in a thread?

  • (A) Stops the thread
  • (B) Pauses the thread
  • (C) Requests the thread to stop its execution
  • (D) Wakes up the thread
What's Tag

As you may know, questions are organized under broad categories. Each category can include various types of questions. For example, the "History" category might contain questions about the Revolt of 1857, Shivaji Maharaj, Ancient History, Buddhism, and more.

To further refine this organization, we've introduced tags, which act as sub-categories to group questions more specifically.

Verified users can add tags to any question. If you have any suggestions regarding this system, we'd love to hear from you. Contact Us

Learn More