Chapter TEN
Concurrency and Multithreading


Exam Objectives

Create worker threads using Runnable and Callable, manage the thread life cycle, including automations provided by different Executor services and concurrent API.
Develop thread-safe code, using different locking mechanisms and concurrent API.
Process Java collections concurrently including the use of parallel streams.

Answers

1. The correct answer is C.

Explanation:

2. The correct answer is B.

Explanation:

3. The correct answers are B and C.

Explanation:

4. The correct answer is A.

Explanation:

5. The correct answer is D.

Explanation:

6. The correct answer is D.

Explanation:

7. The correct answer is A.

Explanation:

8. The correct answer is B.

Explanation:

9. The correct answer is B.

Explanation:

Do you like what you read? Would you consider?


Do you have a problem or something to say?

Report an issue with the book

Contact me