June 2018
Intermediate to advanced
280 pages
7h 46m
English
Streams can be sequential or parallel. They can be created from the Collection interface, JarFile, ZipFile, or BitSet, and, starting from Java 9, from the Optional class stream() method. The Collection class supports the parallelStream() method, which may return a parallel stream or a serial stream. It is possible to construct streams of various types, such as boxed primitives (Integer, Long, Double) or other classes, by calling the appropriate Arrays.stream(...). The result of calling it for a primitive type is a specialized Stream of the following: IntStream, LongStream, or DoubleStream. Those specialized stream classes can construct streams by using one of their static methods, such as generate(...), of(...)
Read now
Unlock full access