Chapter TEN
Concurrency and Multithreading


Exam Objectives

Create both platform and virtual threads. Use both Runnable and Callable objects, manage the thread lifecycle, and use different Executor services and concurrent API to run tasks.
Develop thread-safe code, using locking mechanisms and concurrent API.
Process Java collections concurrently and utilize 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 A.

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