R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `flatMap()` do in a stream?

  • (A) Maps values and flattens nested streams
  • (B) Filters null values
  • (C) Concatenates two streams
  • (D) Returns the maximum value
  • Correct Answer - Option(A)
  • Views: 12
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`flatMap()` transforms each element to a stream and flattens the resulting streams into one.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.