Skip to content
Sharp

Java Threading · interview question

How do Virtual Threads affect the performance of CPU-bound tasks compared to I/O-bound tasks?

Multiple choiceMediumchapter-15-curatedpremiumjava-threadingvirtual-threads
Choose one answer
Answer and explanation

Correct answer

B. Virtual Threads provide more benefits for I/O-bound tasks.

Why

Virtual Threads are particularly advantageous for I/O-bound tasks as they efficiently handle blocking operations without tying up OS threads, whereas CPU-bound tasks benefit less.

Test yourself on Java Threading

A free test with instant, explained results. No account needed.

Start free test
All Java Threading questions →