Blog Java JDK 14 – New Features in Java 14
Java 14 features

JDK 14 – New Features in Java 14

The launch of every new Java release is always a topic of concern for every IT enthusiast. So, it is not abnormal if you’re here looking for Java 14 features. This may be a little too soon, but where’s the harm in getting informed beforehand? You must know that Java 13 features unveiled on September 17, 2019, according to the six-month release cycle. The interesting feature about Java 14 is that it would be a non-LTS (long term support) release.

Just like other non-LTS releases, Java 14 would get support for six months before the arrival of its successor. The six-month release cycle makes it easier to predict the Java version history and build excitement regarding new features. When you know the exact date for the arrival of new Java release, it is reasonable to speculate the expected features. The following discussion aims to highlight some of the speculated Java 14 features. Before the final release notes come with the launch of Java 14, let us find out what’s already in the works!

JDK 14 is on the fast track for launch on March 17, 2020, in accordance with the six-month release cycle. It will be a production release after initial work starts on December 12, 2019, for Ramp down phase one. The second phase of Ramp down would be on January 16, 2020. Subsequently, the initial release candidate published on February 6, 2020, and the final release candidate published on February 20, 2020.

Aspired to become a Certified Java professional? Check out our Java certifications training courses and start your certification preparation!

What’s New in Java 14 Features?

The existing speculations about new features in Java 14 primarily rest upon two confirmed proposals for JDK enhancement (JEP). The JEP (JDK Enhancement Proposal) 352 and JEP 358 are the two confirmed proposals for including in Java 14. Another proposal most likely to come forward in Java 14 follows along the lines of one of Java 13 features. Switch expressions could also become one of the notable features in Java 14. Let’s have a look at the most expected features of Java 14 features. 

  • Helpful NullPointerExceptions

The first addition among Java 14 new features would be the JEP 358 that indicates helpful NullPointerExceptions. The proposal for improvement in the case of NullPointerExceptions in Java 14 aims at increasing the usability of exceptions developed from JVM. The proposed mechanism for achieving this functionality is the exact description of the variable that was null.

This addition among Java 14 features receives backing from various authors for this proposal. The objective of the authors is to provide reliable and productive information to support staff and developers. As a result, the developers and support staff could know clearly about the premature termination of a program.

Furthermore, the proposal of NullPointerExceptions also intends to improve program understanding by the better and clearer association of dynamic exception with static program code. The foremost goal of this addition among Java 14 new features refers directly to reduce the doubts and confusion of developers regarding NullPointerExceptions.

Java Se 11

  • Non-volatile Mapped Byte Buffers

The next verified proposal for new features in Java 14 refers to non-volatile mapped byte buffers. This new feature in Java 14 could help in adding new file mapping modes particular to specific JDK. This entry among new Java 14 features can help in using the FileChannel API for creating MappedByteBuffer instances.  The MappedByteBuffer instances generally refer to the non-volatile memory or NVM.

NVM is ideal for ensuring that programmers could build and update program state across various runs without additional costs. The additional costs could be in the form of massive translation or copying costs generally required by input and output operations. This feature would work effectively in the case of transactional programs. So, the primary objective of this enhancement proposal for JDK 14 is the flexibility for clients to access and update NVM coherently and efficiently from a Java program.

Another prominent yet secondary objective of this proposal most like to be among Java 14 features is also important. The non-volatile mapped byte buffers could help in the implementation of a committed behavior by leveraging restricted, JDK-internal API. The API definition should be in the ‘Unsafe’ class for the facility of re-use by classes different from MappedByteBuffer. The classes could need to commit to NVM, and so, this feature shows promising potential.

The third objective for non-volatile mapped byte buffers is for allowing the mapping of buffers over NVM. The idea underlying this objective refers clearly to the tracking of the mapped buffers through existing APIs. As a result, the newly proposed Java 14 features can also ensure the benefits of monitoring and management. The target platforms for this improvement have been already decided with OS and CPU combination for either. The OS/CPU platforms ideal for the proposed new features for Java 14 is Linux/x64 and Linux/AArch64.

  • Switch Expressions

Another feature that can possibly come to the proposals stage comes directly from Java 12 features and Java 13 features. Switch expressions found recognition as preview features in JDK 12 and JDK 13. Now, you can expect to find Switch expressions as a permanent feature in Java Development Kit 14. The function of switch expressions is primarily for simplification of coding through the extension of the ‘switch’ statement.

The extension is primarily meant for using ‘switch’ as an expression as well as a statement. Switch expressions could also prepare the foundation for using pattern matching in ‘switch’. Now, pattern matching among the new Java 14 features could provide notable advantages to developers. Developers could use pattern matching for conditional extraction of components from objects. The prominent advantage of conditionally extracting components from objects is evident in precision, safety, and speed of the process.

The release of Java SE 11 has come up with a number of new features. Let’s find out and understand the new Java SE 11 features!

Features in Early-access Release Notes

A further look at the Java Version history shows that many updates and other exclusions could also characterize the new release. So, a closer look at the release notes for Java 14 can help us know more about expected features. However, readers should keep in mind that these features are not a part of the final release notes. You could find them in Java 14 exactly as described or with some changes or not included at all.

  • The first entry among the release note refers directly to the Build 18 for Java 14. The DatagramChannel implementation would receive an update. The update would enable attempts of disconnect method for workaround Linux kernel behavior reverting local port to 0 after dissolving the association. The Javadoc for DatagramChannel:: disconnect receives an update with API note for clarifying permission to IOException for leaving channel’s socket. The API note also gives recommendations for closing the channel upon a failed disconnect.
  • Another addition that could be a part of Java 14 comes in the form of Build 16 in the early-access release notes. The first addition in this build refers to amendments in the semantics of the com .sun .jndi .dns .timeout .initial property of JNDI DNS provider implementation. The value of the timeout is uniformly applicable in the case of UDP and TCP queries.
  • The next addition that you can find in this build is the addition of a new method declaration to the SAX ContentHandler. The feature can help in receiving notification for the XML declaration. Implementation of this method declaration could help applications to receive values of encoding, version, and standalone attributes declared in the input.
  • The Build 14 in the early-access release notes show the maximum number of entries in potential new Java 14 features. The changes in MethodType::fromMethodDescriptorString ensure performing RuntimePermission(“getClassLoader”) security permission check. Now, the classes will be loaded and linked by Class.forName().
  • The next important concern arising in the case of updates and new features in the upcoming Java release is the removal of system property. Another formidable entrant among new features refers directly to Default ErrorListener, staying away from reporting warnings or errors to the Console.
  • The Build 10 in the early-access release notes also show one of the new entries among features for Java 14. The first mention refers directly to the support for the accounting currency format. The currency format instances with accounting style can help in formatting the amount in parentheses.
  • The Java 14 Build 10 also supports turning off AOT according to the default configuration. It also implies changing the related flags to experimental such as UseAOT, AOTLibrary, and PrintAOT. In addition, the default value of UseAOT is disabled now as compared to the previous default value of enabled.
  • Finally, the early-access release notes also focus on Build 8 of Java 14, showcasing new features expected in it. Now the SunJCE provider would throw NoSuchAlgorithmException for AES/GCM/PKCS5Padding. The Java 14 Build 8 also excludes Deprecated APIs. Furthermore, there is no netscape.javascript.JSObject::getWindow method in the early-access build of Java 14.

Final Words        

The most important thing to note here is that we wouldn’t have to stop on Java 14 features alone. The attention on the new features about to come in Java 14 is primarily because of the need to anticipate. Just like earlier versions of Java borrowed ideas for improvements from features in the previous releases, the new versions would follow the same path.

The features that are in proposal right now would be parts of Java 14 only to lay the foundation. For what? Obviously, for the new features in Java 15. Most important of all, the focus on monitoring and management in the emerging java releases would become a design precedent!

So, as a Java professional, you need to keep yourself updated about the different versions of Java and its new features. You can validate your skills and get ahead in your development career with a Java certification. Check out our Java Certification Training Courses and start your preparation now!

About Neeru Jain

Technology Scientist by Mind and Passionate Writer by Heart!! With an enthusiasm for technological research and learning, Neeru turned out to be a technology expert. Her Belief: “Words are powerful enough to change Mind, Life, and the World; only the writer should have a real passion for Writing!!”
Spread the love


Please enter your comment!
Please enter your name here