This example will show how to convert a Stream into a List using Java 8. A Collector is a reduction operation that will accumulate elements from a stream into a cumulative result. We must supply a Collector in order to gather all the Stream’s items in a List which we can do by using a connivence method toList() from the Collectors utility. Collectors.toLists() is probably the most frequently used collectors used.
Or you could staticly import the Collectors class to reduce the Stream into a List.