Java, Software Development

How To Use Java 8 Stream Reduce Example

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

Read More...

Java, Software Development

Java 8 – Convert Iterator to Stream Using StreamSupport

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

Read More...

Java, Software Development

Avoid NullPointerException with Stream.ofNullable in Java 9

This post demonstrates how to avoid NullPointerException in Java 9 when working with Stream and using the overloaded of metho

Read More...

Software Development

Group List items into Several Lists using Stream in Java 8

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

Read More...

Java, Software Development

Java 8 Convert Stream Values to Map Entries Examples

This post demonstrates how to convert a stream of objects to a Map object using Collectors.toMap(…) methods.

Read More...

Software Development

Java 8 – Reuse Predicates by combining Lambdas

This post demonstrates how to reuse Predicate @FunctionalInterface implementations to reduce duplicate codes in your applications.

Read More...

Software Development

Java 8 Convert values in a Stream using Map

Convert any value or object to a different type. For instance, MyEntityBean to MyEntityAPI. No loops. Just Lambda.

Read More...

Software Development

Java 8 Get the Min and Max values in a Stream

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?

Read More...