R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which collector allows you to flatten nested data within groups?

  • (A) groupingBy().reducing()
  • (B) groupingBy().mapping().flatMap()
  • (C) groupingBy().mapping(..., toList())
  • (D) groupingBy().summarizingInt()
  • Correct Answer - Option(C)
  • Views: 2
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
Use `mapping()` within `groupingBy()` to transform each element before collecting.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.