Method ofNullable() of Stream object in Java

This method was added from Java 9.

This method will return the Stream object of an element in case this element is not null; if it is null, it returns an empty Stream. Example:

When you run the above code, it will print… Read More

Method dropWhile() of Stream object in Java

This method was added from Java 9.

This method also has the parameter Predicate interface and its function is the opposite of the takeWhile() method. This method also passes each element in your Stream object from left to right and ignores all elements that… Read More

Method takeWhile() of Stream object in Java

This method was added from Java 9.

The parameter of this method is the Predicate interface and this method takes the elements in your Stream object from left to right, until the condition of the Predicate object is no longer fulfilled. Example:

In… Read More

Reactive Streams in Java

Reactive Streams are a concept that defines the mechanism for handling streams asynchronously with non-blocking back pressure. Back pressure here, we can understand that there is too much work to do at the same time, then it should lead to overload. Non-blocking back pressure means… Read More