Oracle presented the Java SE 19 platform (Java Platform, Standard Edition 19). The open OpenJDK project was used as a reference implementation.
Java SE 19 has maintained backward compatibility with previous releases of the Java platform. Most of the previously written Java projects without changes will be operational when running under the new version.
Java SE 19 assemblies (JDK, JRE and Server JRE) are ready for installation on Linux (x86_64, AArch64), Windows (x86_64) and macOS (x86_64, AArch64).
The Java 19 implementation is fully open under the GPLv2 license with GNU ClassPath exceptions that allow dynamic binding to commercial products.
Java SE 19 will have a regular support period, updates for which will be released until the next release. Java SE 17 will have a long support period (LTS). Updates for the version will be released until 2029.
Java 19 includes:
- preliminary support for record patterns (record pattern), expanding the possibility of mapping to the sample that appeared in Java 16 by means for parsing the values of classes of the record type;
record Point(int x, int y) {}
void printSum(Object o) {
if (o instanceof Point(int x, int y)) {
System.out.println(x+y);
}
}
- support for RISC-V architecture in assemblies for Linux;
- preliminary support of the FFM (Foreign Function & Memory) API to organize the interaction of Java programs with external code and data by calling functions from external libraries and accessing memory outside the JVM;
- support for virtual streams, which are lightweight threads that greatly simplify the writing and maintenance of high-performance multi-threaded applications;
- the fourth preliminary implementation of the Vector API, which provides functions for vector computing using vector instructions of x86_64 and AArch64 processors. The new API allows you to explicitly control vectorization for parallel data processing;
- the third experimental implementation of template mapping in “switch” expressions, allowing you to use flexible templates with a series of values in “case” labels.
Object o = 123L;
String formatted = switch (o) {
case Integer i -> String.format("int %d", i);
case Long l -> String.format("long %d", l);
case Double d -> String.format("double %f", d);
case String s -> String.format("String %s", s);
default -> o.toString();
};
About The Author: Yotec Team
More posts by Yotec Team