Constructor reference in Java

I have introduced the method reference in the previous tutorial, in this tutorial, I introduce you another new concept: constructor reference. Like the method reference, the constructor reference is used to abbreviate the Lambda Expression expression. How is it in details? Suppose you are working… Read More

Functional Interface in Java

In the Lambda Expression tutorials, I introduced you to the Functional Interface and its importance when using Lambda Expression in Java code. In this tutorial, I will talk more about Functional Interface! Definition of Functional Interface OK, let me first talk about the definition of… Read More

Type Inference in Java

Type Inference in Java is a Java Compiler’s ability base on the declaration, the calling to determine the datatype, without explicitly declaring it, reducing redundancy code. For you to understand more, I will take an example as follows. Assuming you are working with the List… Read More

Using Lambda Expression to sort a List in Java

Normally, before Java 8, when we want to sort a List object, we will use Comparator object. For example:

Result: Since Java 8, we have another way to do the sorting a List object. That is: using sort() method in List object with Lambda… Read More