Return to site

New language features in Java 17

October 18, 2021

In the middle of September, Java 17 got released. This is the new LTS (Long Term Support) version, replacing Java 11. In this article I am going over the changes in the language that happened since Java 11. Java is definitely still on the move and in more than one direction.

―𝐒𝐰ðĒð­ðœðĄ ðžðąðĐðŦ𝐞𝐎𝐎ðĒðĻ𝐧𝐎

â€•ð“ðžðąð­ 𝐛ðĨðĻ𝐜ðĪ𝐎

―𝐑𝐞𝐜ðĻðŦ𝐝𝐎

―ðĒ𝐧𝐎𝐭𝐚𝐧𝐜𝐞ðĻ𝐟 ðĐ𝐚𝐭𝐭𝐞ðŦ𝐧 ðĶðšð­ðœðĄðĒ𝐧𝐠

―𝐒𝐞𝐚ðĨ𝐞𝐝 𝐜ðĨ𝐚𝐎𝐎𝐞𝐎

―𝐏𝐚𝐭𝐭𝐞ðŦ𝐧 ðĶðšð­ðœðĄ 𝐟ðĻðŦ 𝐎𝐰ðĒð­ðœðĄ

𝐂ðĻ𝐧𝐜ðĨðŪ𝐎ðĒðĻ𝐧

Since the last LTS, Java has seen many language improvements. While some of these are more standalone there is definitely a coherence discoverable between switch pattern matching, sealed classes and records.

Oracle has recently decided that it will release an LTS version every two years from now on. This used to be three years. So the next LTS version will be Java 21.

With so many new and exciting features added to the language you should feel encourages to upgrade your existing projects to the latest Java version.

The code examples in this article plus some additional examples can be found in my GitHub repository.