{"id":109,"date":"2018-09-24T09:34:36","date_gmt":"2018-09-24T09:34:36","guid":{"rendered":"http:\/\/www.javaindia.in\/blog\/?p=109"},"modified":"2025-04-22T10:53:50","modified_gmt":"2025-04-22T05:23:50","slug":"java-10-features-that-you-should-know-about","status":"publish","type":"post","link":"https:\/\/www.javaindia.in\/blog\/java-10-features-that-you-should-know-about\/","title":{"rendered":"10 Java 10 Features That You Should Know About"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">The release of Java 10 early this year brought several new improvements for the programming language. It came just 6 months after its predecessor but brought considerable enhancement in its features. Now that Java 11 is just around the corner, all those who have not already moved to Java 10 need to make it fast so that they can be geared up for the upcoming version. So wouldn\u2019t you be interested in knowing more about Java 10 features and how a move can be beneficial for your business. Let\u2019s check out all the features of this version and know it better.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">1. Local Variable Type Inference (JEP 286)<br \/>\n<\/span><\/span><\/span><\/strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">Like Kotlin, JavaScript, and Scala, the version has a var keyword which renders ease into the<a href=\"https:\/\/www.javaindia.in\/\" target=\"_blank\" rel=\"noopener\"> Java development<\/a> process. This enhances the developer\u2019s experience significantly by removing the strict type declarations and allowing them to use the var keyword for local variables.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">2. Time-Based Release Versioning (JEP 322)<br \/>\n<\/span><\/span><\/span><\/strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">This new feature, as the name suggests, adopts a time-based release cycle with a revised version-string scheme of the JDK and the Java SE Platform. The language will come now have a six-month release model. Even though some may not consider this as a practical approach, it is always good to have new features in every few months. <\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>3. Heap Allocation on Alternative Memory Devices (JEP 316)<br \/>\n<\/b><\/span><\/span><\/span><\/strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">This feature helps the HotSpot VM in allocating the Java object heap on an alternative memory device, which has specified by the user. For instance, it will enable a multi-JVM environment to allocate all the higher priority processes to the DRAM, while the lower priority processes will be assigned the NV-DIMM memory. <\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>4.<\/b><\/span><\/span><\/span> <strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">Garbage-Collector Interface (JEP 304)<br \/>\n<\/span><\/span><\/span><\/strong><strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">This Java 10 feature <\/span><\/span><\/span><\/strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">increases the code isolation of different garbage collectors and comes up with a clean interface for them. There are several benefits of this feature, such as it facilitates the exclusion of a GC from a JDK build and also makes it easy to add a new GC without having an impact on the code base.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>5. Parallel Full GC for G1 (JEP 307)<br \/>\n<\/b><\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">In Java 9 version, G1 was the default GC and was designed to avoid full collections; however, it would fall back on a full GC when the concurrent collections could not reclaim memory quickly enough. The new version parallelizes the full GC algorithm to ensure that the same number of threads are used as in the concurrent collections in case of a G1 Full GC to improve the overall performance.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>6. Root Certificates (JEP 319)<br \/>\n<\/b><\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">With JEP 319, developers get a default set of root Certification Authority that make OpenJDK builds more appealing. This feature reduces the disparity between the Oracle JDK and OpenJDK builds. Additionally, the key security components such as TLS now work by default in the OpenJDK builds.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>7. Consolidation of the JDK Forest into a Single Repository (JEP 296)<br \/>\n<\/b><\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">Java 10 reduces the clutter from the platform by consolidating the numerous repositories of the JDK forest into one repository. This overcomes the operational complexities that the large number of repositories are associated with.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>8. <\/b><\/span><\/span><\/span><strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>Thr<\/b><\/span><\/span><\/span><\/strong><strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">ead-Local Handshakes (JEP 312)<br \/>\n<\/span><\/span><\/span><\/strong><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">This feature serves as the foundation for improved VM performance as it allows the execution of a callback on threads without performing a global VM save point. It means that the JVM can stop individual threads rather than all of them. This feature brings numerous small improvements to enhance the VM performance, such as removing some memory barriers from the JVM.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>9. Experimental Java-Based JIT Compiler (JEP 317)<br \/>\n<\/b><\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">Another important feature of this release is that it presents Graal, the Java-based JIT compiler released with the last version, as an experimental Ahead-of-Time (AOT) compiler. However, it is to be remembered that the compiler is still in an experimental stage and should not be used for production.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>10. Removal of the Native-Header Generation Tool (JEP 313)<br \/>\n<\/b><\/span><\/span><\/span><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\">In the Java 10 version, there will no longer be a separate tool for generating header files while compiling JNI code, as this will be done through javac. The javah tool will be removed from the JDK with this JEP. <\/span><\/span><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><span style=\"font-family: Times New Roman, serif;\"><span style=\"font-size: medium;\"><b>Conclusion<br \/>\n<\/b><\/span><\/span><\/span><span style=\"font-size: medium; font-family: 'Times New Roman', serif; color: #000000;\">Now that you know all about the wonderful new features of Java 10, you will be probably interested in having an application developed on it or even opting for <\/span><a style=\"font-size: medium; font-family: 'Times New Roman', serif;\" href=\"https:\/\/www.javaindia.in\/services\/java-migration-integration-services\" target=\"_blank\" rel=\"noopener\">Java application migration<\/a><span style=\"font-size: medium; font-family: 'Times New Roman', serif; color: #000000;\">. Java India is a reputed company that can help you with both. Connect with us to leverage this innovative platform for your next business application.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The release of Java 10 early this year brought several new improvements for the programming language. It came just 6 months after its predecessor but brought considerable enhancement in its features. Now that Java 11 is just around the corner, all those who have not already moved to Java 10 need to make it fast so that they can be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-java"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":4,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":530,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions\/530"}],"wp:attachment":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}