R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which collector allows grouping by one key and then reducing the result?

  • (A) groupingBy()
  • (B) groupingBy(..., reducing(...))
  • (C) partitioningBy(..., joining(...))
  • (D) toMap(..., reducing(...))
  • Correct Answer - Option(B)
  • Views: 57
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
You can combine `groupingBy()` with `reducing()` to reduce values within each group.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.