JDK 12 favicon
All About JDK 12
JDK 12 • 2019 • Java 12
Switch Expressions (preview)Shenandoah GCJVM Constants APITeeing CollectorCompact Number Format

JDK 12 and the shift from JDK 11

Switch Expressions (preview, JEP 325). Teeing Collector. Compact Number Formatting. JVM Constants API. Shenandoah GC (experimental). Microbenchmark Suite. G1 improvements.

Why JDK 12 mattered

The release in context

Switch Expressions (preview, JEP 325). Teeing Collector. Compact Number Formatting. JVM Constants API. Shenandoah GC (experimental). Microbenchmark Suite. G1 improvements.

Switch Expressions (preview)Shenandoah GCJVM Constants APITeeing CollectorCompact Number Format
  • Switch Expressions (preview, JEP 325). Teeing Collector. Compact Number Formatting. JVM Constants API. Shenandoah GC (experimental). Microbenchmark Suite. G1 improvements.
  • Key release highlights included Switch Expressions (preview), Shenandoah GC, JVM Constants API, Teeing Collector.
  • Compared with JDK 11, the most visible shifts included Shenandoah GC (experimental), Shenandoah GC, Switch Expressions (preview).
  • Switch Expressions begin a 3-version journey to finalisation. Shenandoah GC adds ultra-low pause times.
  • The release cadence itself became part of the JDK story: fewer all-or-nothing eras and more regular capability steps.
Platform stack

JDK 12 architecture preview

This larger diagram expands the smaller JDK badge into a layered platform view showing how the development kit, runtime, virtual machine, APIs, tools, and supporting subsystems fit together for this release.

Previous-version diff

What changed from JDK 11 to JDK 12

The release cadence itself became part of the JDK story: fewer all-or-nothing eras and more regular capability steps.

New Features / Modern APIs

  • Switch Expressions (preview) appeared in JDK 12, adding a new capability in new features / modern apis.
  • Teeing Collector appeared in JDK 12, adding a new capability in new features / modern apis.
  • HTTP Client appeared in JDK 12, adding a new capability in new features / modern apis.
  • Collection.of() factory carried forward from JDK 11 and settled into the baseline by JDK 12.

Other Base Libraries

  • Compact Number Format appeared in JDK 12, adding a new capability in other base libraries.
  • JVM Constants API appeared in JDK 12, adding a new capability in other base libraries.
  • HTTP Client API appeared in JDK 12, adding a new capability in other base libraries.
  • HTTP Client API (final) moved from active change in JDK 11 into a more stable baseline by JDK 12.

JVM: Execution Engine & GC

  • Shenandoah GC (experimental) appeared in JDK 12, adding a new capability in jvm: execution engine & gc.
  • G1 GC (promptly return memory) was updated in JDK 12, showing active movement in jvm: execution engine & gc.
  • Epsilon GC (no-op) carried forward from JDK 11 and settled into the baseline by JDK 12.
  • ZGC (experimental) carried forward from JDK 11 and settled into the baseline by JDK 12.
Matrix slice

Quick comparison table: JDK 11 vs JDK 12

This side-by-side view turns the source evolution matrix into a faster way to see which language, tooling, runtime, and platform layers moved between these two releases.

Area Component JDK 11 JDK 12 Why it stands out
JVM: Execution Engine & GC Shenandoah GC (experimental) Not present NEW Shenandoah GC (experimental) appeared in JDK 12, adding a new capability in jvm: execution engine & gc.
JVM: Memory Management Shenandoah GC Not present NEW Shenandoah GC appeared in JDK 12, adding a new capability in jvm: memory management.
Java Language Features Switch Expressions (preview) Not present NEW Switch Expressions (preview) appeared in JDK 12, adding a new capability in java language features.
New Features / Modern APIs Switch Expressions (preview) Not present NEW Switch Expressions (preview) appeared in JDK 12, adding a new capability in new features / modern apis.
New Features / Modern APIs Teeing Collector Not present NEW Teeing Collector appeared in JDK 12, adding a new capability in new features / modern apis.
Other Base Libraries Compact Number Format Not present NEW Compact Number Format appeared in JDK 12, adding a new capability in other base libraries.
Other Base Libraries JVM Constants API Not present NEW JVM Constants API appeared in JDK 12, adding a new capability in other base libraries.
Tools & Tool APIs Microbenchmark Suite (JMH) Not present NEW Microbenchmark Suite (JMH) appeared in JDK 12, adding a new capability in tools & tool apis.
Deployment Applet / Java Plug-in Deprecated Deprecated Applet / Java Plug-in started being phased out in JDK 12, signaling a shift away from older platform assumptions.
Deployment Java Web Start Deprecated Deprecated Java Web Start started being phased out in JDK 12, signaling a shift away from older platform assumptions.
JVM: Execution Engine & GC G1 GC (promptly return memory) Not present UPD G1 GC (promptly return memory) was updated in JDK 12, showing active movement in jvm: execution engine & gc.
lang and util Base Libraries Collections (Teeing Collector) Not present UPD Collections (Teeing Collector) was updated in JDK 12, showing active movement in lang and util base libraries.
Java Language Features instanceof pattern (planned) Not present Present instanceof pattern (planned) appeared in JDK 12, adding a new capability in java language features.
JVM: Memory Management ZGC region-based NEW Present ZGC region-based carried forward from JDK 11 and settled into the baseline by JDK 12.
Structured comparison

Grouped reading of the release shift

Switch Expressions begin a 3-version journey to finalisation. Shenandoah GC adds ultra-low pause times.

New Features / Modern APIs
New in JDK 12
  • Switch Expressions (preview)
  • Teeing Collector
  • HTTP Client
  • Collection.of() factory
  • Predicate.not()
Updated by JDK 12
  • HTTP Client API (final)
Other Base Libraries
New in JDK 12
  • Compact Number Format
  • JVM Constants API
  • HTTP Client API
Updated by JDK 12
  • HTTP Client API (final)
  • Security (TLS 1.3)
JVM: Execution Engine & GC
New in JDK 12
  • Shenandoah GC (experimental)
  • Epsilon GC (no-op)
  • ZGC (experimental)
Updated by JDK 12
  • G1 GC (promptly return memory)
Historical platform profile

Release narrative

Switch Expressions (preview, JEP 325). Teeing Collector. Compact Number Formatting. JVM Constants API. Shenandoah GC (experimental). Microbenchmark Suite. G1 improvements.

Switch Expressions begin a 3-version journey to finalisation. Shenandoah GC adds ultra-low pause times.

Switch Expressions (preview)Shenandoah GCJVM Constants APITeeing CollectorCompact Number Format
Why it mattered later

Why JDK 12 matters in the JDK timeline

This release fits into the steady JDK cadence where tooling, runtime behavior, and delivery capabilities evolve one step at a time.

  • JDK 12 sits in the timeline as a feature release, which shaped how teams evaluated and adopted it.
  • It is commonly remembered for Switch Expressions (preview), Shenandoah GC, JVM Constants API.
  • Compared with JDK 11, it gives a clearer picture of how the JDK platform was evolving release by release.
  • Switch Expressions begin a 3-version journey to finalisation. Shenandoah GC adds ultra-low pause times.
Related pages

Continue through the platform story