Java MCQ on Thread | Java Thread Questions for OCJP


Java multiple choice questions on Thread. Free online self-assessment test on Java Thread concepts. This test has 10 multiple choice questions on java threads. These mock test series on Java programming language consisting of a wide range of multiple-choice questions are designed to evaluate the self-performance of Java skills. Very useful in interviews and OCJP certification exam preparation.



Java Online Mock OCJP Test Series: 1

Topic- Threads in Java

The test consists of 10 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- Easy





Q1: Select the method that should be overridden to provide thread's behavior when Thread class is extended:















Q2: start() method is called to ______

Select the correct answer:













Q3: Threads in java share the same memory space and resources.

Select True or False:











Q4: Select the output of the below program:

public class threadExample extends Thread{
String msg;

threadExample(String s){
msg=s;
System.out.println("Hi");
}
public void run() {
System.out.println(msg);
}
public static void main(String[] args) {
threadExample obj1=new threadExample("hello");
threadExample obj2=new threadExample("world");
}
}














Q5: A syncronized method ______












Q6: A deadloack in Java is ____?

Select the correct answer:












Q7: When a currently running thread is moved to ready to run state just to give other high priority thread a chance to execute, then this process is called:












Q8: When a currently running thread executes for a fixed length of time and then moved to ready to run state, this process is called ________












Q9: Call to Thread.yield() method will____

Select the correct answer:














Q 10: Select all the correct non-runnable states of a thread:


































Quantitative aptitude - practice tests


A series of aptitude practice tests comprising multiple-choice questions (MCQ) on varied aptitude topics that evaluate the quantitative ability.