Question 20
Back to Exercise
Which workload benefits most from Java 21 virtual threads?
- A Heavy number crunching on 8 cores
- B Thousands of concurrent tasks that mostly wait on I/O (HTTP, database) Correct
- C A single-threaded loop
- D GUI rendering
Correct Answer: Option B
Blocking a virtual thread is cheap, so thread-per-request scales.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!