Oracle announced a new version of Java which turned out to be the speediest one for its release, till now. It has decided to promote Open JDK binaries as primary JDK which reduces the hassle for the big companies to shuffle from the current system every time, a new version is enhanced. Few of the prominent features are listed below:

Java 10 features

  1. Local Variable Type InferenceIt is the newest feature for the developers in Java 10. Type inference is Java compiler’s ability to look at each method invocation and corresponding declaration to determine the type argument or multiple arguments that make the invocation applicable. Local Variable meaning ‘var’ is not a keyword, but it is a reserved type name. So it cannot be used as method, package, class or interface. Its uses are defined such as:
    • Limited only to Local Variable with an initializer
    • Indexes of enhanced for loops or indexes
    • Local declared in for loop

    Let us walk through an example:

    var numbers = List.of(1, 2, 3, 4, 5); // inferred value ArrayList<string>
    // Index of Enhanced For Loop
    for (var number : numbers) {
    // Local variable declared in a loop
    for (var i = 0; i < numbers.size(); i++) {
  2. Garbage Collector InterfaceWith the new Java version 10 update now, the code isolation of multiple garbage collectors can be improvised with the coming of the new and most common Garbage Collector Interface. It emphasis on providing better modularity to the internal GC code which in future, will help for adding new GC without changing existing codebase. Also helps in removing or maintaining the previous GC.
  3. Additional Unicode Language – Tag ExtensionsIt will enhance the java.util.Locale and related APIs to execute additional Unicode extensions of BCP 47 language tags. This added the support for the below mentioned additional extensions –
    • cu (currency type)
    • fw (first day of the week)
    • rg (region override)
    • tz (time zone)
  4. Thread – Local HandshakeA handshake operation is a callback that is executed for each Java Thread while that thread is in a safe point safe state. The callback is implemented by the VM thread while keeping the thread in a blocked state or by the thread itself. It allows executing a callback on threads without performing a global VM safe-point. It is possible and also cost-effective to stop individual threads and not just all threads or none.
  5. Heap Allocation on Alternative Memory DevicesApplications such as in-memory databases and big data have an increasing demand for memory. Such applications could use NV-DIMM for the heap since NV-DIMMs has a larger capacity, at lower cost, in comparison to DRAM.

    Heap Allocation feature enhances the capability of HotSpot VM by allocating the Java object heap on an alternative memory device, such as an NV-DIMM as specified by the user. It also targets alternative memory devices that have the same semantics as a DRAM, including the semantics of atomic operations, and can be used instead of DRAM for the object heap to the existing application code without any change.

  6. Root CertificatesJava 10 promotes Open JDK binaries as primary binaries for the ease of using the system without needing to update it frequently. To ensure the integrity and confidentiality, It comprises of a default set of root Certification Authority (CA) certificates in the JDK which makes sure that both Oracle & Open JDK binaries will function the same.
  7. Application Class – Data sharingWhile initiating JVM, it performs some preliminary steps, one of which is loading classes in memory. If there are multiple jars having several classes, then the lag in the first request is simply visible. There arises a problem with serverless architecture, where boot time is critical. In order to carry forward the application startup time, Application class-data sharing is used. It is to reduce footprint by sharing common class metadata across several Java processes.
  8. Removal of the Native-Header Generation Tool – javahIt allows removing javah tool from JDK. It is not mandatory to remove – it is optional. The tool functionality of javad is added in JDK 8, which helps to write native header files at the compile time without using javah.
  9. Centralizing the JDK Forest into a Single Repository Since long, for Java development, several repositories were utilized for JDK codebase. Multiple repositories do provide several advantages, but it also comes with various operational downsides. It helps to combine the numerous repositories of the JDK forest into a single repository for streamlining the development process streamline development.
  10. Experimental Java-Based JIT CompilerGraal, as defined in Java 9, was an alternative to the JIT compiler which has been used to plugin to the JVM, meaning that the JIT compiler is not attached with JVM and it can be dynamically plugged in or replaced with any another plugin. It also introduces Ahead of Time (AOT) compilation in java. It also supports the interpretation of the polyglot language. This feature enables the Java-based JIT compiler, Graal, to get used as an experimental JIT compiler on the Linux/x64 platform.

Ending the Line

Overall, it seems that Java 10 updates provide supportive features. It also modifies or merges the features from the older version. By this enhancement, now Java developers have the privilege to code with less time complexity and efficiently. Yet, it also helps the developers to work less on some features and reduce the time complexity.

Vishal Shah

Vishal Shah has an extensive understanding of multiple application development frameworks and holds an upper hand with newer trends in order to strive and thrive in the dynamic market. He has nurtured his managerial growth in both technical and business aspects and gives his expertise through his blog posts.

Want to Hire Skilled Developers


    • Leave a message...

    Related Articles
    Java Lambda Expression
    Jan 25, 2021
    Is AWS Lambda a Server-Side Component?
    Jul 10, 2020
    Microservices Implementation in Java
    Jan 25, 2021