R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which Stream method turns each element into a Stream and flattens them?

  • (A) map()
  • (B) filter()
  • (C) flatMap()
  • (D) collect()
  • Correct Answer - Option(C)
  • Views: 10
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`flatMap()` replaces each element with a stream and then flattens them into a single stream.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.