R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method of `IntStream` returns the average of elements?

  • (A) sum()
  • (B) average()
  • (C) mean()
  • (D) avg()
  • Correct Answer - Option(B)
  • Views: 12
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`average()` returns an `OptionalDouble` representing the average of elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.