The toArray() operation collects the emitted stream values into an array no matter whether the stream is parallel or not. The only limitation is that the stream has to be finite. Otherwise, the processing never ends.
The post Java streams 23. ToArray appeared first on Nick Samoylov, programmer and writer.
Published on April 12, 2020 16:13