Java 8 Tutorials

Java 8 is an extremely advanced and most awaited release of the Java development platform. It includes many huge upgrades to the Java programming model by introducing functional programming with the help of lambda expressions and other powerful libraries like Streams.

Here is a complete list of Java 8 tutorial that explains the basic-to-advanced features of Java 8 and their usage in a simple and intuitive way.

In this series of Java 8 tutorials we will see Java 8 Streams, Lambda, Functional Interface and other important Java 8 features with example and complete code.

Example blog post alt

Java 9 Features (JShell, Immutable List, Set, Map, Private methods in Interfaces etc)

Java 9 Features (JShell, Immutable List, Set, Map, Private methods in Interfaces etc), pcoming exciting features of Java 9, including most awaited REPL (JShell), Immutable List, Set, Map, Private methods in Interfaces and much more.

Continue reading

Example blog post alt

Java 8 Lambda Expressions (Functional Interfaces, Variable Capture, Method References, Default Methods)

In this article we will discuss about most exiting release of Java ever, Java 8 and its new features like Lambda expressions and Streams. In this particular section we will come to know syntax and functioning of Java 8 Lambdas.

Continue reading

Example blog post alt

What are Lambda Expressions and Functional Interfaces in Java 8

In this article we will see, what are Lambda Expressions in Java 8, Why and How to use them ?, What are functional interfaces and relation between lambda expressions and functional interfaces.

Continue reading

Example blog post alt

How to Iterate a map or list in Java 8 using lambda

In Java 8 we can use forEcah to iterate over a list or map of objects, we will use Employee" class list employees and employeesMap as example to iterate over it using java 8 lambd

Continue reading

Example blog post alt

Java 8 Comparator and Sorting using Lambda

In this article we will see how to write a comparator using Java 8 lambda, and sort a list using Java 8 lambda expressions.

Continue reading

Example blog post alt

How to Filter a Collection in Java 8 using Streams "filter()" and "predicate"

In Java 8 we can filter a List/Collection using Java 8 Streamss filter(), we will use Employee class list employees to filter and collect result in a list.

Continue reading

Example blog post alt

How to Covert Java 8 stream from one type to another using map()

In this article we will see how to convert a Java 8 stream of one type to another type, we will use Employee class list employees to be converted into various other forms:

Continue reading

Example blog post alt

How to use flatMap() in Java 8 Streams example

In this article we will see how to convert list of list to plain list in Java 8 Streams using flatMap(), we will use Employee class's list of list listOfList to be converted into a single list mergedList.

Continue reading

Example blog post alt

How to Aggregate data using Java 8 streams

In this article we will see how to aggregate data in Java 8 streams, Using Java 8 groupBy() function we can aggreagte data on any dimension.

Continue reading

Example blog post alt

How to sort a Map by keys or values in Java 8

In this article we will see how to sort a map by keys and values, we will sort the map by keys and by values using Java 8. We have example data that contains map of Employee id and object.

Continue reading

Example blog post alt

How to Convert a list to map in Java 8

In this article we will see how to convert a list to map in java 8 streams, and how to handle exception thrown by duplicate keys located in list.

Continue reading

Example blog post alt

How to Convert a map to list in Java 8

In this article we will see how to conver a map to list in java 8, there are various available ways to do so in java 8..

Continue reading

Example blog post alt

Java 8 allMatch(), anyMatch() and noneMatch() functions examples

In this article we will see how to use allMatch() and anyMatch() functions in java 8 with examples, while using as intermediate functions in a stream.

Continue reading

Got a technical query, or stuck somewhere ?