1 Java Language Changes Summary

The following tables summarize new Java language features since Java SE 9.

New Language Features

The following table lists the new features in the Java language since Java SE 9.

Table 1-1 Java Language Changes Summary

Release New Language Features

9

Java Platform Module System (JSR 376): see Project Jigsaw on OpenJDK

Milling Project Coin ( JEP 213): seeJava Language Changes for Java SE 9

Small Enhancements to the Java Programming Language (JSR 334): see Java Language Changes for Java SE 9

10

Local Variable Type Inference (JEP 286)

11

Local-Variable Syntax for Lambda Parameters (JEP 323): see Local Variable Type Inference

14

Switch Expressions (JEP 361)

15

Text Blocks (JEP 378)

16

Record Classes (JEP 395)

Pattern Matching for instanceof (JEP 394)

17

Sealed Classes (JEP 409)

Permanent and Preview Language Features

The following table lists, for each release since Java SE 9, which language features became permanent and which language features were in preview. See Preview Features for information about preview features and how they can become permanent.

Evolution of Language Features

The following tables list the changes made to the Java language since Java SE 9. The first column specifies the feature while the subsequent columns specify a Java SE release. An icon specifies whether the feature was made permanent or available as a preview feature:

  • Permanent feature: Permanent feature
  • First Preview, Second Preview: First or second preview, respectively

See Preview Features for information about preview features and how they can become permanent or be withdrawn.

Table 1-3 Java Language Changes from Java SE 17 to Java SE 9

Feature 17 16 15 14 13 12 11 10 9
Sealed Classes Permanent Feature JEP 409 Second Preview JEP 397 First Preview JEP 360            
Record Classes   Permanent Feature JEP 395 Second Preview JEP 384 First Preview JEP 359          
Pattern Matching for instanceof   Permanent Feature JEP 394 Second Preview JEP 375 First Preview JEP 305          
Text Blocks     Permanent Feature JEP 378 Second Preview JEP 368 First Preview JEP 355        
Switch Expressions       Permanent Feature JEP 361 Second Preview JEP 354 First Preview JEP 325      
Local-Variable Syntax for Lambda Parameters: see Local Variable Type Inference             Permanent Feature JEP 323    
Local Variable Type Inference               Permanent Feature JEP 286  
Java Platform Module System: see Project Jigsaw on OpenJDK                 Permanent Feature JSR 376
Milling Project Coin: see Java Language Changes for Java SE 9                 Permanent Feature JEP 213
Small Enhancements to the Java Programming Language: see Java Language Changes for Java SE 9                 Permanent Feature JSR 334