R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of the following is used to summarize statistics like count, sum, average?

  • (A) Collectors.toMap()
  • (B) Collectors.summarizingInt()
  • (C) Collectors.groupingBy()
  • (D) Collectors.statistics()
  • Correct Answer - Option(B)
  • Views: 25
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma

`Collectors.summarizingInt()` gathers count, sum, min, average, and max in one step.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.