2016-02-17

Welcome readers, accept our newest submission to the on-going Java quiz series. This time, we’ve added a Java multithreading quiz with top 20 interview questions. This Java quiz is to evaluate your Java multithreading skills and knowledge of the concept. Multithreading is an essential subject to learn and to master it will make you write efficient code. This Java multithreading quiz includes both theoretical and coding related questions. While answering the questions, you would need to run the code fragments to get to the right choice. This type of Java practice test is even more useful for readers who’ve recently started learning core Java multithreading. They can practice Java online and verify their coding and multithreading knowledge level. Just for your note that our team has picked many of these questions from the recent Java interviews held by large IT majors.

You must have observed that we always try our best to make the quizzes as fruitful as they could be. All the multithreading questions were chosen after due diligence ensuring quality and correctness. In case, you also want to evaluate yourself for basic Java knowledge then, we suggest you go through the following entry level Java quiz first. It’ll help you strengthen your hold on the Java language.

Java Multithreading Quiz with 20 Interview Questions.

Time limit: 0

Quiz-summary

0 of 20 questions completed

Questions:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

Information

For your information, please note that this Java Multithreading Interview Questions Quiz has both single/multiple choice questions. We suggest to please carefully attempt all the questions. Press the below Start quiz button to go ahead.



Java Multithreading Quiz with 20 Interview Questions

Please continue.

You have already completed the quiz before. Hence you can not start it again.

Quiz is loading...

You must sign in or sign up to start the quiz.

You have to finish following quiz, to start this quiz:

Results

0 of 20 questions answered correctly

Your time:

Time has elapsed

You have reached 0 of 0 points, (0)

Average score

Your score

Categories

Java
0%

If you have enjoyed the Java Multithreading Interview Questions Quiz, please do share this post on facebook, twitter and other social media platforms of your choice.

For viewing the correct answers of this Java Multithreading Interview Questions Quiz, please press the View questions button shown below.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

Answered

Review

Question 1 of 20

1. Question

10 points

What is the name of the method that is used to start the execution of a thread?

init();

start();

run();

resume();

None of these.

Correct

Incorrect

Question 2 of 20

2. Question

10 points

Which of the following are the valid constructors of Thread class?

i and iii

ii and iv

i and ii

ii and v

None

Correct

Incorrect

Question 3 of 20

3. Question

10 points

Which amongst the following are methods of the Object class?

a) notify();

b) notifyAll();

c) isInterrupted();

d) synchronized();

e) interrupt();

f) wait(long msecs);

g) sleep(long msecs);

h) yield();

a, b, d

b, d, e

a, b, f

b, c, d

None of these.

Correct

Incorrect

Question 4 of 20

4. Question

10 points

Which of the following line of code is suitable to start a thread?

Thread t = new Thread(X);

None of these.

Correct

Incorrect

Question 5 of 20

5. Question

10 points

Which of the following methods cannot directly cause a thread to stop executing?

Calling the SetPriority() method on a Thread object.

Calling the wait() method on an object.

Calling notify() method on an object.

Calling sleep() method on a Thread object.

None of these.

Correct

Incorrect

Question 6 of 20

6. Question

10 points

Which of the following methods make thread leave the running state?

i, ii and iv

ii, v and vi

iii, iv and vii

iv, v and vii

None of these.

Correct

Incorrect

Question 7 of 20

7. Question

10 points

Which method must be defined by a class implementing the java.lang.Runnable interface?

void run()

public void run()

public void start()

None of these.

Correct

Incorrect

Question 8 of 20

8. Question

10 points

Which method registers a thread in a thread scheduler?

run();

construct();

start();

register();

None of these.

Correct

Incorrect

Question 9 of 20

9. Question

10 points

Assume the following method is properly synchronized and called from a thread A on an object B:

wait(2000);
After calling this method, when will the thread A become a candidate to get another turn at the CPU?

After thread A is notified, or after two seconds.

After the lock on B is released, or after two seconds.

Two seconds after thread A is notified.

Two seconds after lock B is released.

None of these.

Correct

Incorrect

Question 10 of 20

10. Question

10 points

Which of the following piece of code will create and start this thread?

new Runnable(MyRunnable).start();

new Thread(MyRunnable).run();

new Thread(new MyRunnable()).start();

new MyRunnable().start();

Show more