R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which collector provides a count of grouped elements?

  • (A) Collectors.counting()
  • (B) Collectors.toList()
  • (C) Collectors.averagingInt()
  • (D) Collectors.summarizingDouble()
  • Correct Answer - Option(A)
  • Views: 9
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`counting()` returns the number of items in a stream or group.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.