Java Stream min and max
In this post, we will learn about using Java Stream min and max methods to find the minimum and the maximum element in a Java Stream.
In this post, we will learn about using Java Stream min and max methods to find the minimum and the maximum element in a Java Stream.
We use the Java Stream’s reduce method to reduce a stream of values to a single result. There are three overloaded Stream#reduce operation.
The Java stream toArray methods, which we learn in this post, allow us to collect/convert a stream into an array.
Google Guava offers many utility methods to simplify the coding. In this post, we will learn about the utilities in the Google Guava Streams.
Collectors mapping in Java is a static method in the Collectors class. In this post, we will learn about the mapping method in Collectors.
In this post, we will see six ways to convert a Java stream to a List. You can extend these if you want to convert a stream to a Set as well.
The Java 8 LongStream is a sequence of primitive long-valued elements and is a long primitive specialization of Stream.
Collectors.joining returns a Collector which concatenates the stream elements separated by a delimiter, prefix and suffix in encounter order.
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.