Articles, Home

Java 8 Collectors Class with Examples

Collectors is a final class that extends Object class. It provides reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, etc.Implementations of Collector interface that implement various useful reduction operations, such as accumulating elements into collections, summarizing elements according to various criteria, etc.

Articles, Home

Spring Boot + Angular 8 CRUD Example Tutorial

In this tutorial, we will learn how to develop a CRUD (Create, Read, Update, Delete) Web Application using Angular 8 as a front-end and Spring boot 2 restful API as a backend.If you are looking for Angular 6 with spring boot 2 integration example then check out Spring Boot + Angular 6 CRUD Example article.If you are looking for Angular 7 with spring boot 2 integration example then check out Spring Boot 2 + Angular 7 CRUD Example article.You can download the source code of this tutorial from my GitHub repository at the end of this tutorial.

Articles, Home

Java 8 Functional Interfaces

In this post, we will learn the Java 8 the functional interface with examples.Key points about the functional interface:An Interface that contains exactly one abstract method is known as a functional interface.It can have any number of default, static methods but can contain only one abstract method. It can also declare methods of the object class.Functional Interface is also known as Single Abstract Method Interfaces or SAM Interfaces. It is a new feature in Java 8, which helps to achieve a functional programming approach.A functional interface can extend another interface only when it does not have any abstract method.The Java API has many one-method interfaces such as Runnable, Callable, Comparator, ActionListener, and others. They can be implemented and instantiated using anonymous class syntax.

Articles, dummyCategory

Java 8 Optional Class with Examples

Java introduced a new class Optional in JDK 8. It is a public final class and used to deal with NullPointerException in Java application. You must import java.util package to use this class. It provides methods which are used to check the presence of a value for the particular variable.

Articles, dummyCategory

Java 8 Lambda Expressions

In this post, we will discuss the most important feature of Java 8 that is Lambda Expressions. We will learn Lambda Expressions with lots of examples by comparing Java 7 and Java 8 examples.You can download the source code from my GitHub Repository. This blog can also help to migrate from Java 7 to Java 8.

Articles, dummyCategory

Java 8 Method References

Java provides a new feature called method reference in Java 8. Method reference is used to refer method of the functional interface. It is a compact and easy form of a lambda expression. Each time when you are using a lambda expression to just referring a method, you can replace your lambda expression with method reference.

Articles, Home

Java 8 Stream Examples

Java provides a new additional package in Java 8 called java.util.stream. This package consists of classes, interfaces and enum to allows functional-style operations on the elements. You can use stream by importing java.util.stream package in your programs.