R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which collector is used to compute the average of integer values?

  • (A) Collectors.counting()
  • (B) Collectors.summingInt()
  • (C) Collectors.averagingInt()
  • (D) Collectors.reducing()
  • Correct Answer - Option(C)
  • Views: 2
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Collectors.averagingInt()` computes the average of integer values extracted from stream elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.