A numeric stream can be created by methods range(startInclusive, endExclusive) and rangeClosed(startInclusive, endInclusive). The new stream emits sequential values starting with startInclusive. The difference between the methods is that rangeClosed() creates a stream that also emits endInclusive.
The post Java streams 9. Create numeric stream using range() appeared first on Nick Samoylov.
Published on July 31, 2019 15:58