Which method would you use to get the maximum value from a Stream?

  1. max()
  2. maximum()
  3. findMax()
  4. collectMax()
Correct answer max()

Explanation

`max()` returns the maximum element according to a Comparator.

Update: Admin added a tag on this question

Topics

By Admin · · 29 views