Java 简明教程
Java 15 - New Features
Java 15 是一个主要特性版本,它为 JAVA 带来了许多特定于 JVM 的更改和特定于语言的更改。它遵循 Java 10 及以后引入的 Java 发布节奏,并于 2020 年 9 月发布,距离 Java 14 发布仅六个月。
Java 15 is a major feature release and it has brought many JVM specific changes and language specific changes to JAVA. It followed the Java release cadence introduced Java 10 onwards and it was released on Sep 2020, just six months after Java 14 release.
Java 15 是一个非 LTS 版本。
Java 15 is a non-LTS release.
New Features in Java 15
以下列出 Java 15 中引入的主要新特性。
Following are the major new features which are introduced in Java 15.
-
JEP 360 - Sealed Classes − To provide fine grained control over the inheritance.
-
JEP 368 - Text Blocks − A second preview feature to handle multiline strings like JSON, XML easily.
-
JEP 375 - Pattern matching Type Check − enhancements to existing pattern matching preview feature of Java 14.
-
JEP 371 - Hidden Classes − To allow runtime creation of non-discoverable classes.
-
JEP 384 - Records − A preview feature enhancing a new type record introduced in Java 14.
-
JEP 383 - Foreign Memory Access API − Enhancement to incubating feature of java 14.
-
JEP 377, 379 - Garbage Collectors − ZDC and Shenandoah garbage collectors are now part of standard API.
-
JEP 339 - Edwards-Curve Digital Signature Algorithm (EdDSA) − Cryptographic signatures are now implemented using EdDSA.
-
JEP 373 - Reimplement the Legacy DatagramSocket API − legacy implementations of the java.net.DatagramSocket and java.net.MulticastSocket APIs are replaced with simpler and more modern implementations which are easy to maintain and debug.