Skip to content
Sharp

Reactive Streams · interview question

What type of transformation does flatMap() provide in a reactive stream?

Multiple choiceMediumchapter-19-curatedpremiumreactive-streamsnon-blocking-i-o-event-loops
Choose one answer
Answer and explanation

Correct answer

D. A one-to-many transformation

Why

The flatMap() method provides a one-to-many transformation, where each item can be transformed into a Publisher of multiple items. This allows for the merging of multiple streams into a single stream.

Test yourself on Reactive Streams

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

Start free test
All Reactive Streams questions →