Java 8 Stream

Creating Streams in Java

Learn to create Streams of primitives and objects in Java using some most popular ways. We will learn to create finite as well as infinite streams.

Using ‘if-else’ Conditions with Java Streams

Learn to apply if-else logic in a Java 8 stream of elements to filter elements based on certain condition. The if-else condition can be applied using the lambda expressions in stream filter() function.

Boxed Streams in Java

In java 8, to convert a stream of primitives to collection, you must first box the elements in their wrapper class and then collect them i.e. boxed stream.

Get all Dates between Two Dates as Stream

Date and time handling has always been a pain area for Java developers. The new Date-Time API added in Java 8 changed the way, we interact with date and time in Java. New Date API is a very powerful and much-needed improvement. The only thing missing was, getting a stream …

Java Stream distinct(): Collect Unique Values

Using java 8 stream API, you can use stream.distinct() method to filter or collect all distinct elements from a collection. Let’s learn how to find distinct elements with java stream API.

Functional Interfaces in Java

Introduced in Java 8, a functional interface is simply an interface that has exactly one abstract method. Learn more about functional interfaces in this tutorial.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.