This post shows how to use Java Stream Reduce with example codes. The idea of the reduce operation is the generation of a single result from a collection of values
Although not a common scenario, some libraries return Iterators instead of Stream or Collection objects. Why? Because they can. If the Java libraries you are using have methods that return
This post demonstrates how to avoid NullPointerException in Java 9 when working with Stream and using the overloaded of metho
Group List items into Several Lists using Stream in Java 8 is easy. We have a list of Persons and we want to group them into Female, Male, Unknown list
This post demonstrates how to convert a stream of objects to a Map object using Collectors.toMap(…) methods.
This post demonstrates how to reuse Predicate @FunctionalInterface implementations to reduce duplicate codes in your applications.
Convert any value or object to a different type. For instance, MyEntityBean to MyEntityAPI. No loops. Just Lambda.
Do you remember your first programming assignment in college? Most like it is one of those simple Mathematics like get the min and max values from a given list. How about from a list of objects?