parallel streams

Stream Optimization in Java-8

Reading Time: 4 minutes In java-8 streams are introduced to handle huge data so we can process the data efficiently. Streams are lazy and its do not process elements until a terminal condition is reached. After a terminal condition is met then each element is processed individually. If there is a short-circuiting operation at the end, the stream processing will terminate whenever all the conditions are satisfied. The new Continue Reading

Rules while working with stream in Java 8

Reading Time: 3 minutes First, let’s have a basic understanding of stream. Then we will have a look at the side effects that can occur while working with streams. Streams represent a sequence of objects from a source, which supports aggregate operations. One thing to be notified while working with streams  is that, aggregate operation (intermediate operations) are lazy evaluated i.e. they do not start processing the content of Continue Reading