A Quick Look at The Programming Features Introduced between Java 1.8 and Java 17

Features that make your Java code adhere to modern standards

Ruby Valappil
Javarevisited

--

Photo by Reka Illyes on Unsplash

Java went real quick from 1.8 to 17 and this year version 18 is slated for release. In this article, we will try to cover the features that were released from the 1.8th version till the 17th.

This is going to be a lengthy list, so let’s not spend too much time on setting up the stage.

Please do note that the below list doesn’t cover all the features and changes that were introduced in each release but the ones that would be most helpful in typical programming cases and makes programming more interesting and easy.

Java 8

Lambda:
Lambda expressions let us use functionality as a method argument. Let’s take a look at the code before Java 8 when we had to create an anonymous class to implement a simple interface.

Thread t = new Thread(new Runnable() {
public void run() {
System.out.println("Start thread");
}
});

Using lambda expressions, we can express the instance of a class in a single line

Thread t1 = new Thread(() -> {
System.out.println("Start 1st thread");
});

--

--