java web developers

Java 10 has just been rolled out, what should Java web developers know regarding its features?

In the new release schedule from Java, there showed that in every six months, there is a new Java release. And just this March, JDK 10 was released, being the first release of the said schedule. This Java 10 release has some interesting features that came with it and here are as follows:

JEP 286: Local-Variable Type Inference

Java now has a var keyword allowing you to declare a local variable not requiring you to specify its type, just like in Scala, Kotlin, and JavaScript. The type will then just be inferred from context. To give you an example, let’s say var name = “Java”, the compiler will already know that the type is String.

Note that the var keyword can only be used for local variables such as those that are inside methods or code blocks, and can’t be used for member variable declaration in the body.

Compared to Python, Java is still a statically typed language. Meaning, once you assigned the type, you can not change it. Like when you set var name = “Java” and then name = 3, that is not right.

Simply, the amount of code needed in declaring local variables in Java is reduced. In such cases like var list = List.of(1, 2.0, "3"), the list will be inferred as List<? extends Serializable & Comparable<..>> which is an intersection type.

JEP 322: Time-Based Release Versioning

With the release of JDK 10, Java has adopted a new release cadence, and that is every six months. However, this became the talk of the town and is being debated whether it’s good to get new features every six months or developers are given too little time to adapt to this new release, JDK. To mention, LTS release will be every three years, considered to be a major release.

By April of this year, JDK 10.0.1 will be released as update element will increment one month after the feature element is incremented. Then in July 2018, JDK 10.0.2 will released, and so on.

JEP 304: Garbage Collector Interface

Considered one of the most interesting and useful features from Java 10 release, it improves the source code isolation of different garbage collectors through the introduction of a clean garbage collector (GC) interface.

JEP 307: Parallel Full GC for G1

This feature improves G1 worst-case latencies by creating the full GC parallel. Reviewing the release of Java 9, the default GC used for the JVM was G1 which was designed just to avoid full GC. Until the concurrent collections could no longer reclaim memory that quick, ending up on a full GC creating a problem.

JEP 316: Heap Allocation on Alternative Memory Devices

With this JDK 10 feature, HotSpot VM is enabled to allocate the Java object heap on an NV-DIMM or other alternative memory devices which are specified by the user. Simply, assigning lower priority processes to use the NV-DIMM memory is made possible and not only allocating higher priority processes to the DRAM in an environment that is multi-JVM.

Might as well check out the other features of JDK 10 such as JEP 296, JEP 319, JEP 317, JEP 312, and JEP 313 here.

Just to let you know that Fligno is looking for Java Developers. If you think you have what it takes to be part of our growing family, submit your resumes to

Leave a Comment

Interested? For a free consultation, Enquire now!