Use Lambda Expression to sort elements of a List in Java

Normally, before Java 8, when we want to sort the elements of a List in Java, we will use the Comparator object. Eg:

Result: From Java 8 onwards, we have another way of doing this. That is, using the sort() method of the List… Read More

Components of HotSpot JVM

Java applications run on a Java Virtual Machine (JVM) so understanding how Java applications work in the JVM will help us understand how to organize and write code more efficiently. Currently, we have a variety of JVMs built by different companies based on the JVM… Read More

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

Method reference in Java

Method reference is a new Java concept from version 8. It comes with Lambda Expression, which makes code writing using Lambda Expression even short but still shorter in some cases. In this tutorial, let’s learn more about the method reference in Java! OK, let’s get… 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