The latest 14th version of the Java SE (Standard Edition) Platform has reached General Availability for all developers and enterprises on 17 March 2020 as the first available from Oracle – the major Java developer.
In this article, I want to highlight the most important functionalities, their impact on improving the quality of coding and the direction of further development.
What’s new in Java 14?
Java 14 offers sixteen main enhancements and changes, including:
- 2 incubator modules,
- 3 preview features,
- 2 deprecated features,
- 2 removals.
The new features delivered in this version include:
- JEP 305: Pattern Matching for instanceof (Preview) –This eliminates the boilerplate code by removing the repetitions that could provide opportunities for errors to creep unnoticed into programs. It allows common logic and more concise type-safe code.
- JEP 343: Packaging Tool (Incubator) – It allows developers a way to package Java applications for distribution in specific formats. This helps developers with modern applications, where the runtime is a requirement, with applications placed in one package. This tool is in an incubator module, which is a way of putting non-final APIs for the developers.
- JEP 345: NUMA-Aware Memory Allocation for G1 – Boost the overall performance of the G1 on large machines.
- JEP 349: JFR Event Streaming – Exposes JDK Flight Recorder (JFR) data for continuous monitoring. This will improve access to JFR data for various applications and tools for further innovation.
- JEP 352: Non-Volatile Mapped Byte Buffers – Adds a file mapping mode when non-volatile memory is used.
- JEP 358: Helpful NullPointerExceptions – Improves the usability by describing precisely which variable was null and other helpful information. This will increase developer productivity and improve the quality of development and debugging tools. Improve program understanding by more clearly associating a dynamic exception with static program code.
- JEP 359: Records (Preview) – It supplements Java with records that provide a compact syntax for class declarations for shallowly immutable data.
- JEP 361: Switch Expressions (Standard) – Allows to use the switch as an instruction or expression, which simplifies coding, including through the pattern matching function.
- JEP 364: ZGC on macOS and JEP 365: ZGC on Windows – the function of implementing and testing ZGC support on macOS and Windows for the scalability of Linux-based environments.
- JEP 368: Text Blocks (Second Preview) – Text Blocks make it easy to express strings that span several lines of source code. Automatically formats the string predictably and gives the developer control over the format when desired.
- JEP 370: Foreign-Memory Access API (Incubator) – An API to allow Java programs to efficiently and safely access foreign memory outside of the Java heap.
Why this is important?
Through progressive modernization and 6-months releases, Java offers enterprises and software developers a modern language and platform to create the next generation of rich, scalable, and secure applications for a variety of targeted deployment environments, including the cloud.
Java is still the most popular programming language preferred by more than 12 million software developers around the world. Innovations in Java 14 demonstrate, through thoughtful planning and ecosystem involvement – both individuals and organizations in Java Community, that Java platform continues to power modern application development while being constantly developed and improved.
If you want to learn more visit the official OpenJDK webpage or stay tuned with the news from Oracle.