Java 8 StringJoiner with examples
Java 8 StringJoiner class can be used to build a sequence of characters that are separated by a configured delimiter, prefix and a suffix.
java8
Java 8 StringJoiner class can be used to build a sequence of characters that are separated by a configured delimiter, prefix and a suffix.
This post shows 4 ways to throw checked exceptions in Java streams i.e., having a lambda expression that can throw checked exception(s).
Java Streams has a distinct method which removes duplicates by object's equal method. This post explains ways to apply distinct by a property.
The Java Stream Distinct is a stateful intermediate operation which returns a new stream which has only the distinct elements in it.
The Java 8 Streams has findFirst and findAny methods which will return the first element and an arbitrary element from a stream respectively.
This post is on the anyMatch, allMatch and noneMatch methods which are short-circuiting terminal operations on a Java Stream.
A Function is primarily used along with the map operation on a Java stream. In this post, we will learn about Function chaining in Java 8.
We have used a Predicate in a Java stream. This post covers the methods in Predicate class which allow us to do Predicate chaining in Java 8.
A Stream is a sequence of elements supporting sequential and parallel aggregate operations. We will see seven ways to create a Stream in Java
Java 8 added three Summary Statistics classes viz., IntSummaryStatistics LongSummaryStatistics and DoubleSummaryStatistics used to collect statistics.