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