Java Stream takeWhile and dropWhile

The Java Stream takeWhile and dropWhile methods allow to return or drop a prefix/subset of elements in a stream based on a passed predicate.

September 7, 2020

Optional – New methods in Java 9 through 11

Optional was added to Java 8. This post explains the new methods or APIs added to the Optional class in Java from Java 9 through 11 with examples.

November 18, 2019