Which method is used to sort elements of a Stream?
Correct answer
sorted()
Explanation
sorted() is used to sort elements in the natural or custom order.
Update: Admin added a tag on this question
Topics
By Admin · · 30 views