Showing posts with the label openjdk

Java 14 Continues.. new APIs of JDK14 and JVM Changes

If you haven't check my previous blog then visit it link else continue this blog In the previous blog we have discussed some highlighted features of Java14. In this blog we will discuss new APIs of JDK14 and JVM Changes NEW APIs There are 69 new API elements in the core class libraries of JDK 14 . Here are the highlights: There is a new annotation type, Serial. This is intended to be used for compiler checks on Serialization. Specifically, annotations of this type should be applied to serialization-related methods and fields in classes declared to be Serializable . (It is similar in some ways to the Override annotation.) java.lang The Class class has two methods for the new Record feature, isRecord() and getRecordComponents() .The getRecordComponents() method returns an array of RecordComponent objects. RecordComponent is a new class in the java.lang.reflect package with eleven methods for retrieving things, such as the details of annotations and the generi


This Post I will like to showcase features of Java 14 . The release of JDK 14 resumes the six-month release cadence of OpenJDK and signifies that this is working very well. Although some releases have been a little light on new features ( JDK 13 , for example), JDK 14 includes multiple exciting new features for developers. In addition to the usual API changes and low-level JVM enhancements, JDK 14 also includes two language preview features in the form of records and pattern matching for instanceof. All Java developers are familiar with NullPointerExceptions , and now, thankfully, they have been improved to simplify debugging. Java has always protected developers from the kind of common errors that occur in languages like C and C++ through the use of explicit pointers that can be manipulated and point to the wrong place. Sometimes, this can be useful, and developers have resorted to using undocumented and unsupported APIs like sun.misc.Unsafe .In JDK 14 , there is a new incubato