Articles related to : javastreams

Java streams 21. Class Optional

The purpose of an object of Optional class is to avoid returning null as it may cause NullPointerException. Instead, an Optional object provides methods that allow checking the presence of a value and substituting it with a predefined value if the return value is null.

Continue Reading

Java streams 16. Filter, skip, or sort

An intermediate operation returns a Stream object that emits the same or modified value(s) of the same or different type than the stream source. In this installment, we will discuss operations that do not change either element value or type. They just do not allow some elements to propagate downstream.

Continue Reading

Powered by WordPress. Designed by Woo Themes