R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is returned by `Collectors.counting()`?

  • (A) int
  • (B) double
  • (C) long
  • (D) Optional
  • Correct Answer - Option(C)
  • Views: 5
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Collectors.counting()` returns a `long` representing the number of elements in the stream.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.