Distinctive Java 10 Features

Java 10 is the most accelerated release of a Java version in its 23-year history. Java has been criticized for its slow growth and evolution, but Java 10 just went against that concept. This is a release with many developments, the range, and impact of which may not be visible but are far fetching. Here in this article, we will look for some critical Java 10 Features

The new Java 10 feature will add some syntactic sweetness to Java, analyzing it and improving the developer’s experience. It will reduce the excessive use of words associated with writing Java while maintaining the commitment to inactive type safety.

Java 10 consists of various new features and improvements into many functional areas. Some of its important enhancements include advancements for garbage collection and compilation as well as local variable types.

Java 10 Features

  1. JEP 286: Local Variable Type Inference
  2. JEP 322: Time-Based Release Versioning
  3. JEP 304: Garbage-Collector Interface
  4. JEP 307: Parallel Full GC for G1
  5. JEP 316: Heap Allocation on Alternative Memory Devices
  6. JEP 296: Consolidate the JDK Forest into a Single Repository
  7. JEP 319: Root Certificates
  8. JEP 317: Experimental Java-Based JIT Compiler
  9. JEP 312: Thread-Local Handshakes
  10. JEP 313: Remove the Native-Header Generation Tool

The peculiarity of Java 10 features

  1. For achieving a callback on threads without conducting a global VM safe-point, there is a feature of thread-local handshakes.
  2. Application class-data sharing: Used to decrease the footprint by sharing common class metadata across methods. Also, the startup time is adjusted.
  3. They are facilitating the Grall Java-based just-in-time compiler which is to be used in an innovative form on the Linux/x64 platform.
  4. The requirement of parallel full garbage accumulation for the G1 garbage specialist to develop a mean case latency by executing parallelism.
  5. To improve the source-code privacy of different garbage collectors, there is a provision of a clean garbage collector interface. This proposal is striving for better modularity for internal garbage collection code in the HotSpot virtual machine and thus making it accessible to attach a new garbage collector to HotSpot.
  6. New APIs for the betterment of enabling the creation of unmodifiable collections. The Set.copyOf, copy, and Map.copyOf methods will create new collection instances from existing instances. New methods such as to UnmodifiableMap, to UnmodifiableList, and to UnmodifiableSet were added to the Collectors class in the Stream package which will permit the components of a Stream to be assembled into an unmodifiable array.
  7. There will be quicker startup times for the jShell REPL tool mainly when a start file with many pieces is in use.
  8. Three new JVM options will be available to give Docker container users greater control over system memory.
  9. Local variable type inference: Will intensify the language to extend type inference to local variables. The purpose is to reduce the “ceremony” linked with coding while preserving a commitment to inactive type security.
  10. Graal, an innovative just-in-time compiler, can be applied on the Linux/x64 platform.
  11. With the help of HotSpot, it will permit to designate the object heap on an alternative memory device like NVDIMM memory module as stipulated by the user. Due to this characteristic, it is anticipated that future systems may have complex memory architectures.

The Java team at Oracle states that it will not be possible for:

  • Method parameters
  • Constructor parameters
  • Method return types
  • Fields
  • Catch formals (or any different kind of variable declaration).

The evolution of new Java versions was, up until now, very feature driven. It implied that you had to wait for a few years for the next release. Significant developments like Generics, Lambdas, Streams, and Jigsaw made this fact bearable, but quite a lot of the smaller and beneficial language improvements were consistently delayed this way.

Due to Java’s responsibility to support previous versions of Java, we can assume it won’t break backward harmony.

References

Java 10 Release Notes

<< Java Enum (Enumerations) Variable shadowing >>

Leave A Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.