Java 11 Features
We already know that Java10 is the latest release in the market but Java11 is soon to be released(September-2018). Oracle is accelerating its release cycle as never before which means more feature in
What’s new in Java 11?
The Java 11 is scheduled for September 2018. There are already 4 proposals that are planned for the next version which we will discuss in this article.
1) Epsilon: An Arbitrarily Low-Overhead Garbage Collector (JEP 318):
“A No-Op Garbage Collector” is what they call it and the main purpose is to develop a garbage collector that handles memory allocation, without implementing any actual memory reclamation mechanism. This will provide a passive GC implementation with a bounded allocation limit and the lowest latency overhead possible, at the expense of memory footprint and memory throughput. Epsilon can be used for testing for performance, memory pressure, and virtual machine interface. Good thing is we can also use it for short-lived jobs.
2) Local-Variable Syntax for Lambda Parameters (JEP 323):
This is intended to allow var
to be used when declaring the formal parameters of implicitly typed lambda expressions. This will allow var to be used when declaring the formal parameters of implicitly typed lambda expressions. The goal here is to align the syntax of a local variable declaration with the syntax of a formal parameter declaration in an implicitly typed lambda expression. That way, instead of writing this:
(var x, var y) -> x.process(y)
We’ll be able to simply write:
(x, y) -> x.process(y)
3) Remove the Java EE and CORBA Modules (JEP 320):
Following the depreciation of the Java EE and CORBA modules in Java SE 9. These modules will be removed from the entire Java SE platform and SDK. This will be subsequent clean-up process as a part of the process that started in Java 9. If you want to know why Java EE and CORBA modules were included in Java in the first place you can check this.
4) Dynamic Class-File Constants (JEP 309):
This JEP wants to extend the Java class-file format to support a new constant-pool form, CONSTANT_Dynamic. Their goal is to reduce the cost and disruption of creating new forms of materializable class-file constants, by creating a single new constant-pool form that can be parameterized with user-provided behaviour. This seeks to reduce the cost and disruption of creating new forms of materializable class-file constants, which in turn offers language designers and compiler implementors broader options for expressivity and performance.
For the Java platform, Java 9 can be marked as the beginning of the evolution. Java 10 is about local variable type inference and added syntactic features to Java and Java 11 comes with all of the above, plus long-term support of the platform.
Now it does not mean that you must wait for Java 11. But the point is, Java is investing in each of the required points – stability and innovation mainly. I think there is more to come in recent time.
That's all for this topic. If you guys have any suggestions or queries, feel free to drop a comment. We would be happy to add that in our post. You can also contribute your articles by creating contributor account here.
Happy Learning 🙂
If you like the content on CodePumpkin and if you wish to do something for the community and the planet Earth, you can donate to our campaign for planting more trees at CodePumpkin Cauvery Calling Campaign.
We may not get time to plant a tree, but we can definitely donate â‚ą42 per Tree.
About the Author
Comments and Queries
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:<pre><code class="java"> String foo = "bar"; </code></pre>For more information on supported HTML tags in disqus comment, click here.