Learn about Supplier Functional Interface in Java

Supplier is a Functional Interface, so it only contains an abstract method as follows:

This interface simply returns the value in the context that is being used by the get() method. For example, we have the following list:

Now that I want to… Read More

Learn about Consumer Functional Interface in Java

Java 8 introduces a new package containing Functional Interfaces called java.util.function. In this package, we have many interfaces like Consumer, Supplier, Predicate, … In this tutorial, we will learn about Consumer Functional Interface. The content of this interface is as follows:

Because the Consumer… Read More

Install Docker on Ubuntu

Docker is a tool for creating stable environments with applications, enabling us to easily run these built-in environments on different systems. How it is in details, I will have some incoming posts about it. In this tutorial, I only guide you to install Docker on… Read More

@Before annotation in AspectJ

In previous tutorials about introducing aspect oriented programming and compiling-time weaving with AspectJ, I introduced you all to the @Before annotation and @After annotation to insert the code before and after when our application call to a method of an object. They are the Advice. In… Read More

Compile-Time Weaving with AspectJ

In the previous tutorial Introduce about Aspect Oriented Programming, I introduced three ways to insert code using AspectJ: compile-time weaving, post-compile weaving, and load-time weaving. Compile-Time Weaving is the simplest and easiest way to insert the code that will occur when we compile the source… Read More