Java 11 Features

Clean, structured and easy-to-navigate Java 11 reference

Java 11 Features

Category

Feature

Description

New Language Feature

var in lambda parameters

Allows use of var in lambda expressions.

Standard API Changes

String methods enhancements

New methods like isBlank(), lines(), strip(), repeat().

Files.readString() and Files.writeString()

Simplifies reading/writing files as strings.

Optional.isEmpty()

Opposite of isPresent(), adds clarity.

Garbage Collection

Z Garbage Collector (ZGC)

Low-latency GC; scalable and unnoticeable pause times.

Epsilon GC

A no-op GC for performance testing (no memory reclamation).

Performance

Flight Recorder (JFR)

Low-overhead profiling tool now open-sourced.

Improved String concatenation performance

Uses invokedynamic internally.

Deprecation/Removal

Removed Java EE and CORBA modules

These modules are no longer part of the JDK.

Deprecated Nashorn JavaScript Engine

Planned for removal in future versions.

HTTP

Standardized HTTP Client API (java.net.http)

Introduced as incubator in Java 9; now fully standard in Java 11.

Launch Enhancements

Running single-file source-code programs

java HelloWorld.java – No need to compile separately.

Security

TLS 1.3 Support

Improved security and performance in SSL/TLS communications.

Miscellaneous

Unicode 10 support

Supports latest character sets and emojis.

Local-Variable Syntax for Lambda Parameters

Supports var for lambda parameters (enhanced type inference).