R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the result of `collect(Collectors.counting())`?

  • (A) Stream count as Integer
  • (B) Stream count as Long
  • (C) Number of filters applied
  • (D) Execution time
  • Correct Answer - Option(B)
  • Views: 4
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Collectors.counting()` returns the count as a `Long` value.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.