R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which Stream operation returns the maximum element?

  • (A) max(Comparator)
  • (B) min(Comparator)
  • (C) highest()
  • (D) greatest()
  • Correct Answer - Option(A)
  • Views: 8
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`max(Comparator)` is a terminal operation that returns the maximum element wrapped in Optional.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.