As the virtual machine is moving forward and updating quickly, so, at an interval of every six months, Java introduces a new version release to cope with the rate of new technology innovation. The three latest versions in recent years of Java are given below:
- Java SE 13 is released on September 2019
- Java SE 12 is released on March 2019
- Java SE 11(LTS) is released on September 25, 2018
The Most Common Features of Java SE 11 (LTS):
Java String Methods
isBlank() – This instance method returns a boolean value. Empty Strings and Strings with only white spaces are treated as blank.
strip() – Removes the white space from both the beginning and the end of the string.
repeat(int) –The repeat method repeats the string that many numbers of times as mentioned in the method in the form of an int.
Local-Variable Syntax for Lambda Parameters (JEP 323): JEP (323) allows var to be used to declare the formal parameters of an implicitly typed lambda expression.
Nested based Access Control: By using Java Reflection, it will give an IllegalStateException.Java 11 nested access control addresses this concern in reflection.
JEP 309: Dynamic Class-File Constants: The goal of this JEP is to reduce the cost and disruption of developing new forms of materializable class-file constraints.
JEP 318: Epsilon: A No-Op Garbage Collector: Unlike the JVM GC, which is responsible for allocating memory and releasing it, Epsilon only allocates memory.
JEP 320: Remove the Java EE and CORBA Modules:: The modules were already deprecated in Java 9. They are now completely removed.
JEP 328: Flight Recorder: Flight Recorder, which earlier used to be a commercial add-on in Oracle JDK is now open-sourced since Oracle JDK is itself not free anymore.
JEP 321: HTTP Client: The new API supports both HTTP/1.1 and HTTP/2. It is designed to improve the overall performance of sending requests by a client and receiving responses from the server.
JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental): Java 11 has introduced a low latency GC. This is an experimental feature. It’s good to see that Oracle is giving importance to GC’s.
Reading/Writing Strings to and from the Files: Java 11 strives to make reading and writing of String convenient. It has introduced the following methods for reading and writing to/from the files:
JEP 329: ChaCha20 and Poly1305 Cryptographic Algorithms : Java 11 provides ChaCha20 and ChaCha20-Poly1305 cipher implementations. These algorithms will be implemented in the SunJCE provider.
JEP 315: Improve Aarch64 Intrinsics: Improve the existing string and array intrinsics, and implement new intrinsics for the java.lang.Math sin, cos, and log functions, on AArch64 processors.
Removal Features and Options of Java SE 11 (LTS):
- com.sun.awt.AWTUtilities Class
- Lucida Fonts from Oracle JDK
- appletviewer Launcher
- Oracle JDK’s javax.imageio JPEG Plugin No Longer Supports Images with alpha
- Thread.destroy() and Thread.stop(Throwable) Methods
- sun.nio.ch.disableSystemWideOverlappingFileLockCheck Property
- SNMP Agent, JEP 320 Remove the Java EE and CORBA Modules
- Java Deployment Technologies
- JMC from the Oracle JDK, JavaFX from the Oracle JDK
Java SE 11 delivers some exciting features at speed are given below
- Nest-based access control.
- Dynamic class-file constraints.
- Improve Aarch64 Intrinsic, Epsilon: A No-Op Garbage Collector.
- Remove the Java EE and CORBA Modules.
- Launch single-file source-code programs.
- Low-overhead heap profiling etc.