Java 17 language compared to Java 8. How modern Java is better than Java 8?

Why migrate from Java 8 to 17?

Marian Čaikovski
4 min readNov 18, 2021

Over 7 years have passed since Java 8 was released. However, some developers are still stuck with Java 8. Why?

Probably for some developers it is not so clear why to migrate. Particularly for those who read Oracle Java Magazine. Could you get some inspiration from https://blogs.oracle.com/javamagazine/post/its-time-to-move-your-applications-to-java-17-heres-why-and-heres-how?

Let’s review the improvements that has happened to Java language since Java 8 and consider whether modern Java 17 is better than archaic Java 8. For example, verbosity is the most noticeable trait of Java. If you migrate, will the modern code be more legible or look less verbose?

Experimental performance benchmarking I leave for a later post. Here I explore only the modern Java syntax.

Changes made to Java language since Java 8

The new language features can be roughly divided into three categories:

  • Prevention of code reuse
  • Reduction of the verbosity
  • Deprecation of overloaded methods in favor of methods accepting arguments of a shared type such as Object

--

--

Marian Čaikovski

Java, JavaScript and SQL developer. Interested in data collection and visualization.