Quiz on java thread | Java thread MCQs



This section contains a quizlet on 'Java thread' with 13 MCQ questions. Also, check a series of other MCQ quizzes on Java and assess your proficiency in Java programming.


Instructions

Topic- Java thread

The test consists of 13 questions.

No negative marking for this test.

No Time limit

The pass percentage is 70%

The correct answer with a description will be displayed after the answer has been marked.

Submit the test to calculate your score once you are done with all the questions.

Complexity Level- Moderate




Q1: What is a thread in Java?















Q2: run() method in Java thread is used to ______















Q3: Implementing the Runnable interface is another way of ______















Q4: start() method in java thread is used to ______















Q5: setDaemon(true) will _____











Q6: Acquiring the lock of the object by a thread is a way of achieving ______


















Q7: A condition in which a thread T1 waiting to acquire the lock held by T2, whereas the thread T2 is waiting to acquire the lock held by T1 is called ______


















Q8: A thread executing in the Java virtual machine is in ______ state.


















Q9: A thread that has not yet started is in ______ state.


















Q10: A thread that has exited is in ______ state.



















Q11: Thread.yield() is used to ____


















Q12: A method or block declared as Synchronized can be accessed by only one thread at a time














Q13: Thread.sleep() is used to ____