Part 38: Java 18, 19 & 20 – The Journey to Java 21 – Why These Releases Matter More Than You Think

Introduction

If you’ve followed this series from Java 8 to Java 17, you may have noticed something unusual.

After Java 17, we suddenly started discussing Java 21.

Naturally, many developers ask:

  • What happened to Java 18?
  • Was Java 19 skipped?
  • Did Java 20 introduce anything important?
  • Why do most companies migrate directly from Java 17 to Java 21?

The answer lies in how modern Java is developed.

Unlike earlier Java releases, today’s Java follows a predictable six-month release cycle.

Every feature is no longer developed in a single release.

Instead, most major language features evolve over several Java versions before becoming permanent.

Understanding this process is essential because many Java 21 features actually began their journey years earlier.


The Modern Java Release Cycle

Since Java 9, Oracle has adopted a six-month release cadence.

Java 17 (LTS)

↓

Java 18

↓

Java 19

↓

Java 20

↓

Java 21 (LTS)

Every six months, the JDK receives:

  • New language features
  • Library improvements
  • JVM enhancements
  • Performance optimizations
  • Preview features
  • Incubator APIs

What Is an LTS Release?

LTS stands for Long-Term Support.

These releases receive updates for many years and are the versions most enterprises choose for production.

Recent LTS releases:

VersionRelease Type
Java 8LTS
Java 11LTS
Java 17LTS
Java 21LTS

Most organizations migrate directly between LTS releases.


Why Do Intermediate Releases Exist?

Suppose Oracle wants to introduce a revolutionary feature like Virtual Threads.

Should it be released immediately?

Probably not.

Instead, the feature evolves over multiple releases.

Prototype

↓

Preview

↓

Refinement

↓

More Feedback

↓

Final Release

This reduces the risk of introducing breaking language changes.


Understanding Preview Features

Preview features are:

  • Fully implemented.
  • Available for experimentation.
  • Not yet permanent.
  • Subject to change.

Developers can try them early and provide feedback.

To use preview features:

javac --enable-preview

and

java --enable-preview

If the design needs improvement, Oracle can refine it before making it part of the Java language.


Understanding Incubator APIs

Some features begin as Incubator APIs.

These are experimental libraries rather than language features.

Examples include:

  • Foreign Function & Memory API
  • Vector API

They evolve independently of the language syntax.


Java 18 – Refinement Release

Java 18 was not a “small” release.

It primarily focused on:

  • UTF-8 as the default charset
  • Simple Web Server
  • Continued work on Project Loom
  • Continued work on Project Panama
  • JVM improvements
  • Performance enhancements

Many preview features introduced earlier continued to evolve.


Java 19 – Building the Future

Java 19 introduced several features that eventually became part of Java 21.

Examples include:

  • Virtual Threads (Preview)
  • Structured Concurrency (Incubator)
  • Record Patterns (Preview)
  • Pattern Matching for switch (Preview)
  • Foreign Function & Memory API (Preview)

Java 19 served as an important testing ground for these features.


Java 20 – Final Refinements

Java 20 continued improving many preview features.

Examples:

  • Record Patterns
  • Pattern Matching for switch
  • Virtual Threads
  • Structured Concurrency
  • Scoped Values

The language and APIs were refined based on community feedback.


Java 21 – The Final Destination

Many of the features we’ve discussed reached production readiness in Java 21.

Examples include:

FeatureFirst AppearedFinal in Java 21?
Virtual ThreadsJava 19 (Preview)
Pattern Matching for switchJava 17 (Preview)
Sequenced CollectionsJava 21
String TemplatesPreview in Java 21
Scoped ValuesPreview in Java 21
Structured ConcurrencyPreview in Java 21

Notice something important.

Many Java 21 features actually began two or three releases earlier.


Why Enterprises Skip Intermediate Releases

Most companies avoid frequent production upgrades.

Typical migration path:

Java 8

↓

Java 11

↓

Java 17

↓

Java 21

Reasons include:

  • Stability
  • Long-term support
  • Reduced upgrade effort
  • Vendor support
  • Lower operational risk

Intermediate releases are still valuable because they allow developers to learn and test upcoming features.


Should You Ignore Java 18–20?

Absolutely not.

Even if your production systems remain on LTS releases, understanding intermediate versions helps you:

  • Learn features before they become standard.
  • Understand why language designs evolved.
  • Prepare for future migrations.
  • Participate in early adoption where appropriate.

Feature Evolution Timeline

Java 12

↓

Switch Expressions

↓

Java 14

↓

Records

↓

Java 16

↓

Pattern Matching for instanceof

↓

Java 17

↓

Sealed Classes

↓

Java 19

↓

Virtual Threads (Preview)

↓

Java 20

↓

Refinement

↓

Java 21

↓

Final Release

This illustrates that modern Java evolves continuously rather than through isolated releases.


Enterprise Perspective

Suppose you’re upgrading from Java 11 directly to Java 21.

You might think you’re learning “Java 21 features.”

In reality, you’re adopting improvements that accumulated across:

  • Java 12
  • Java 13
  • Java 14
  • Java 15
  • Java 16
  • Java 17
  • Java 18
  • Java 19
  • Java 20
  • Java 21

Understanding that evolution makes migration much easier.


Common Misconceptions

“Java 18, 19 and 20 are not important.”

Incorrect.

Many foundational features were introduced and refined in these releases before becoming permanent.


“Only LTS releases matter.”

LTS releases are the most common production targets, but intermediate releases shape the future of the language.


“Preview features are unstable.”

Preview features are implemented and usable, but Oracle reserves the right to refine them based on real-world feedback before finalizing them.


Best Practices

✔ Build production systems on LTS releases unless your organization has a specific need for a newer non-LTS release.

✔ Follow intermediate releases to understand the direction of the Java platform.

✔ Experiment with preview features in development environments.

✔ Plan migrations around LTS versions while staying informed about upcoming capabilities.


Interview Questions

Why do Java releases occur every six months?

To deliver improvements incrementally, gather community feedback, and evolve the platform more rapidly than the old multi-year release cycle.


What is the difference between an LTS release and a non-LTS release?

LTS releases receive long-term support and are typically chosen for production. Non-LTS releases introduce new features and refinements on a shorter support cycle.


What is a Preview Feature?

A language or API feature that is available for experimentation but is not yet a permanent part of the Java platform.


What is an Incubator API?

An experimental library intended for evaluation and refinement before potential standardization.


Why did Virtual Threads appear before Java 21?

They were introduced as a preview feature in Java 19, refined in Java 20, and finalized in Java 21 after community feedback and further development.


Summary

Java 18, 19, and 20 were not “missing” releases. They were essential stepping stones that allowed Oracle to evolve some of the most significant language and JVM features in a controlled and iterative way. The modern Java release cadence emphasizes continuous innovation, while LTS releases provide stable milestones for enterprise adoption.

As enterprise developers, it’s useful to view Java 21 not as a single release, but as the culmination of several years of carefully refined improvements.


Coming Up Next

Part 39 – Java 21 Sequenced Collections – Bringing Order to the Collections Framework

We’ll explore one of Java 21’s most practical API improvements:

  • Why Sequenced Collections were introduced
  • SequencedCollection
  • SequencedSet
  • SequencedMap
  • first(), last(), reversed()
  • Backward compatibility
  • Spring Boot use cases
  • Cache implementations
  • Queue and deque patterns
  • Enterprise best practices

This is one of those features that quietly improves everyday coding by making the Collections Framework more consistent and expressive.

Leave a Reply

Your email address will not be published. Required fields are marked *