Java 14
New Features
JVM
-
NUMA-Aware Memory Allocation for G1 (JEP 345)
-
JFR Event Streaming (JEP 349)
-
Helpful NullPointerExceptions (JEP 358)
-
Deprecate the Solaris and SPARC Ports (JEP 362)
-
Remove the Concurrent Mark Sweep (CMS) Garbage Collector (JEP 363)
-
ZGC on macOS (JEP 364)
-
ZGC on Windows (JEP 365)
-
Deprecate the ParallelScavenge + SerialOld GC Combination (JEP 366)
Language
API
-
Non-Volatile Mapped Byte Buffers (JEP 352)
-
Remove the Pack200 APIs (JEP 367)
-
Foreign-Memory Access API 1. Incubator (JEP 370)
Tools
-
Remove the Pack200 Tools (JEP 367)
-
Packaging Tool 1. Incubator (JEP 343)
Downloads
Sandbox
Instantly compile and run Java 14 snippets without a local Java installation.
import java.time.DayOfWeek;
import java.time.LocalDate;
public class Java14 {
public static void main(String[] args) {
String when = switch(DayOfWeek.from(LocalDate.now())) {
case MONDAY:
yield "at the beginning of the week";
case TUESDAY:
case WEDNESDAY:
case THURSDAY:
yield "in the middle of the week";
case FRIDAY:
yield "at the end of the week";
case SATURDAY:
case SUNDAY:
yield "at the weekend";
};
System.out.printf("Java 14 %s!", when);
}
}