
In JDK 14, the Solaris port will be decommissioned. A new cadence allows quick disposal of outdated features. Evolution is also a removal of rudiments. DeprecationĮvolution is not just about adding new capabilities. Now Java will have its native API to do the same with new abstractions MemorySegment, MemoryAddress, and MemoryLayout. There are some third-party tools like Ignite, mapDB, and memcached to work with off-heap memory. Foreign-Memory Access API (Incubator) JEP-370 These features are already supported since IntelliJ IDEA 2020.1, while JetBrains engineers, together with Oracle and other OpenJDK contributors, worked on feature design and implementation. Text Blocks –> Multiline String Literals.The new Java language features have well-known analogs in Kotlin. ProjectionMatrix * modelviewMatrix * inVertex Private static String vertexShaderSource = """ This feature extended switch statement, which can be used as an expression with the help of arrow (->), and now can yield/return the value. API enhancements Switch Expressions (Standard) JEP-361 Let’s look at some new features in details. JEP-367: Remove the Pack200 Tools and API.
JEP-363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector. JEP-366: Deprecate the ParallelScavenge + SerialOld GC Combination. JEP-362: Deprecate the Solaris and SPARC Ports. JEP-345: NUMA-Aware Memory Allocation for G1. JEP-352: Non-Volatile Mapped Byte Buffers. JEP-370: Foreign-Memory Access API (Incubator). JEP-305: Pattern Matching for instanceof (Preview). JDK 14 has sixteen new features in six areas: API, Runtime & Performance, Serviceability, Tools, Improved platforms support, and Deprecation. Initially, new capabilities are injected into OpenJDK as preview features the developer community is testing and giving its feedback to JEP leaders, and after a number of releases, the feature becomes standard. Today, we can admit that the Java run-time development process is iterative. Before the change, developers were waiting for the new version with stable features for at least three years. If you are using IntelliJ 2020.1 you can refer the below image to enable this feature.By changing the cadence of OpenJDK releases two years ago, Oracle accelerated the evolution of Java, which was categorically a positive move for the platform and the ecosystem. To enable this feature, we have to add the following arguments for the java compiler -XX:+ShowCodeDetailsInExceptionMessages. In this way, we can exactly know which variable is responsible for the NPE. NullPointerExceptions need no introduction for Java developers, with Java 14 there is an improved description of NullPointerException. These are the useful Java API updates in Java 14. You can read more about this annotation here. To enable these checks, you have to add -Xlint:serial flag to the compiler. There is a new annotation This annotation type is intended to allow compile-time checking of serialization-related declarations, which is similar to the checking enabled by the annotations when you are overriding a method. Previously this was handled through write(byte buff, int offset, int length). In the PrintStream class inside the java.io package, there is a new method called writeBytes(byte buff) which takes the incoming bytes to the method and writes it to the stream. These are the minor additions to Java API: You can have a look at other Methods and Constructors which are marked for removal at –. The methods and are the notable methods that are deprecated for removal in this latest version. Now let’s look at some APIs that are Deprecated for Removal. The package and all the Types under this package are removed.
You can read more information about it here – This legacy compression technology and the API were already deprecated in Java 11. From the package, the Pack200 compression Tools and API are removed.So if you are using the below API in your code, you have to remove those usages before moving to Java 14. Youtube Video for Java 14 new Features Java API Updates Removed API(s)įirst, we will have a look at the API’s which are removed from Java 14.