[go: up one dir, main page]

0% found this document useful (0 votes)
233 views2 pages

Java 8 To 21 CheatSheet

This document provides a comprehensive overview of the key features and enhancements introduced in Java versions from 9 to 21, building on Java 8. It categorizes changes into language syntax, API additions, JVM improvements, and new programming paradigms like virtual threads and pattern matching. Each version's notable features are listed, with Java 11 and 17 being highlighted as Long-Term Support (LTS) releases.

Uploaded by

rameshyadav1249
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
233 views2 pages

Java 8 To 21 CheatSheet

This document provides a comprehensive overview of the key features and enhancements introduced in Java versions from 9 to 21, building on Java 8. It categorizes changes into language syntax, API additions, JVM improvements, and new programming paradigms like virtual threads and pattern matching. Each version's notable features are listed, with Java 11 and 17 being highlighted as Long-Term Support (LTS) releases.

Uploaded by

rameshyadav1249
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Java 8 to Java 21: Feature Comparison Cheat Sheet

Java 8 to Java 21 Summary

This document highlights the major changes and feature enhancements introduced in each Java version from Java 9 to

Java 21, following the baseline Java 8.

Major categories include: language syntax, standard API additions, JVM and GC improvements, and new programming

paradigms such as virtual threads, pattern matching, and records.

Java 9 (Sep 2017)

- JPMS (Module System) - 'module-info.java'

- JShell (REPL)

- Improved Stream API (takeWhile, dropWhile)

- Private methods in interfaces

- Multi-release JARs

Java 10 (Mar 2018)

- Local variable type inference (var)

- Application Class-Data Sharing (AppCDS)

- Thread-local handshakes

Java 11 (Sep 2018) - LTS

- New String methods (isBlank, strip, repeat, lines)

- HTTP Client API (standard)

- Running single-file Java source code

- Removed Java EE and CORBA modules

Java 12-13

- Switch expressions (preview)


Java 8 to Java 21: Feature Comparison Cheat Sheet

- Text blocks (preview)

Java 14-15

- Records (preview)

- Pattern matching for instanceof (preview)

- Helpful NullPointerExceptions

- Sealed classes (preview)

Java 16-17 - LTS

- Records and pattern matching standardized

- Sealed classes standardized

- Strong encapsulation of internal APIs

- Foreign linker and memory API (incubator)

Java 18-20

- Simple web server (jwebserver)

- Virtual threads (preview, Project Loom)

- Structured concurrency (incubator)

- Record patterns (preview)

Java 21 (Sep 2023) - LTS

- Virtual threads (standard)

- Record patterns (standard)

- Pattern matching for switch (standard)

- Sequenced collections

- String templates (preview)

- Foreign function and memory API (standard)

- Scoped values (preview)

You might also like