Collectors joining in Java 8
Collectors.joining returns a Collector which concatenates the stream elements separated by a delimiter, prefix and suffix in encounter order.
Monthly Archives: November 2020
Collectors.joining returns a Collector which concatenates the stream elements separated by a delimiter, prefix and suffix in encounter order.
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.