R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which stream operation would you use to produce a flat structure from nested lists?

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

Explanation by: Ram Sharma
`flatMap()` is used to flatten nested structures like lists of lists.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.