Java Streams

Introduction to Streams

In java we heavily use Collection. Right? We store our data in a suitable collection and then we keep on taking the data from the collection wherever needed, we may process the data or we use the data and most of the time we use iterators to get the data. So we keep on playing […]

Continue Reading...

Java Streams

Observing the Stream and Stream Pipeline

Consider the book example, This looks like a pipeline of operations on the stream. Break it up to multiple steps: Creation of Stream Stream method on Collection will return a Stream of all the elements present in that collection. Filtering the Stream To filter out stream to have only horror books: This operation is performed […]

Continue Reading...