Java Streams

Using Streams with Map in Java 8

Using Streams with Map in Java 8

Ashish Lahoti

Java 8 stream is widely used feature to write code in functional programming way. In this tutorial, we’ll discuss how to use Streams for Map creation, iteration and sorting.

Double Colon (::) Operator in Java 8

Double Colon (::) Operator in Java 8

Method Reference in Java 8

Ashish Lahoti

The double colon :: operator is introduced in Java 8 for method reference. It is a shorthand syntax for lambda expression that executes one method. You can write more compact and readable code using double colon operator as compare to anonymous classes and lambda expression. We are going to understand its usage with lots of examples.

Streams in Java 8

Streams in Java 8

Ashish Lahoti

One of the major feature of Java 8 is addition of Stream. It also has introduced the functional programming in Java. We will discuss different stream operations available in Collection, Array, IntStream with examples. We will also discuss the difference between Intermediate and Terminal operations.