Java Streams – Parallel and Declarative

Java Stream Complete Tutorial MindMap
Streams Complete Tutorial

Streams are introduced in Java 8 along with Lambda, Functional Interfaces, and some other powerful APIs. Streams come with some powerful concepts that can be used to process data not only declaratively but also can use the power of multicore computers fully.

In this blog, we will introduce Streams in detail please follow the below TOC to get yourself equipped with this awesome API.

Using Streams we can process the data in functional Style and declarative style.

If you see this Brain mapping diagram above. As we will discuss streams, the stream is the root node.

We will first discuss the Introduction to streams, where we will just introduce the streams API and it’s an advantage.

In the next topic; Observing the Streams, we will have a closer look at the stream how fluent the API is.

Coming on the next topic we will discuss Stream Pipeline which is built of a source, Intermediate operation, and Terminal Operation.

Then we will discuss a very important concept and that is Stream is not container; some developers are confused with Streams and collection. A stream is not actually a collection but a very advance and fancy iterator which does not contain any data.

Next, we will see that streams are actually lazy, and the advantages of being lazy.

Going deeper into this, we will discuss methods in streams Filter, Map and Reduce.

Then we will see Primitive or Numeric streams of type Int, Long and Double.

After that, we will discuss, Bounded streams or finite streams.

Then we will discuss FlatMap operation which is very interesting and useful to combine two streams.

Then we will discuss parallel streams, We can make streams parallel by just replacing stream with a parallel stream but that has to be done with care. There are things we need to take care of before making a stream operation parallel.


That’s why we will discuss stateful and stateless operations and how to setup parallelism properly.I hope this tutorial will be very exciting and full of concepts for you!