Which method converts a Stream into a Set?
Correct answer
collect(Collectors.toSet())
Explanation
`collect(Collectors.toSet())` collects stream elements into a Set.
Update: Admin added a tag on this question
Topics
By Admin · · 25 views