Skip to content
Sharp

Project Reactor · interview question

In Project Reactor, which operator would you use to transform each element of a Flux into another Flux and then flatten the results into a single Flux?

Multiple choiceMediumchapter-19-curatedpremiumproject-reactorproject-reactor-flux
Choose one answer
Answer and explanation

Correct answer

A. FlatMap()

Why

The flatMap() operator applies a function that returns a Flux to each element and then flattens these Flux instances into a single Flux, allowing for asynchronous processing of multiple elements.

Test yourself on Project Reactor

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

Start free test
All Project Reactor questions →