Core Java

Java 11 Will Include More Than Just Features

What are the upcoming features in Java 11, and how will it be different from Java 9 and 10?

Java 10 might be the new kid on the block, but it’s already time to talk about Java 11. Oracle’s move towards a faster release cycle means that more features and abilities are coming our way, faster than ever before.

Although we have 6 more months until Java 11 will be released, we can already see a glimpse of what’s coming our way, and see how we can adapt. We can also understand whether we should upgrade to Java 9, 10, or if we should want to wait for Java 11.

Let’s check it out.

What’s new in Java 11?

The Java 11 launch date is scheduled for September 2018, and the repository is currently open for bug fixes, as well as propositions for more JDK Enhancement Proposals (JEP) to be added to the upcoming version. While the list is not final, there are already 4 proposals that are planned for the next version:

1. Local-Variable Syntax for Lambda Parameters (JEP 323)

This JEP 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)

This expands Java 10 Local Variable Type Inference, that introduced a new syntax that reduces the verbosity associated with writing Java, while maintaining the commitment to static type safety.

In other words, you’ll be able to declare variables without having to specify the associated type. Similar to the example shown above, Java 10 will offer the following, simple, declaration:

var list = new ArrayList<String>();
var stream = getStream();

That will replace the existing one, that looks like this:

List<String> list = new ArrayList<String>();
Stream<String> stream = getStream();

2. Epsilon: An Arbitrarily Low-Overhead Garbage Collector (JEP 318)

The official name of this JEP is “A No-Op Garbage Collector”, and its purpose is to develop a garbage collector that handles memory allocation, without implementing any actual memory reclamation mechanism.

3. 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. The goal here 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 behavior.

4. 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 is more of a clean-up process, following up on the process that started in Java 9.

Java 11 will include more than just features

While this feature list is still not final and we’re expecting more JEPs to be added in the following months, Java 11 will have a little something extra. One of the main highlights that will come with Java 11, is long-term support of the platform. To understand what it means, let’s take a trip back to September 2017, when Oracle announced that it’s moving to long-term support (LTS) model for their Java SE products.

Up until now, Oracle has tried using the same release for two different set of needs. On one hand, companies want to focus on innovation, releasing features as quickly as possible and not waiting for 2-3 years for every release. On the other hand, they also want to offer stability to their users, who need a product that they can rely on.

Oracle, similar to other leading companies, wants to move fast. Moving to a faster release cycle will allow the company to innovate, as well as offer teams and companies the ability to move faster on their side as well.

However, with fast releases comes the responsibility of keeping platform reliability for its users. Oracle stated that it’d be harder for the company to offer LTS for all of their upcoming versions. That’s why the company decided to provide LTS once every 3 years (or once every 6 versions).

The move towards a faster release cycle is a workflow that is being adopted by large-scale companies, that want to innovate at a faster rate, yet need to make sure their reliability is not hurt in this process. We’ve covered how engineering teams can bridge the gap between the two by revamping their CI/CD processes, from writing code and through monitoring the application after code is deployed to production. You can read more about it right here.

What does “Long-Term Support” mean?

Oracle’s LTS support offering focus on two main points. The first one is Premier support, which provides maintenance and software upgrades for your Oracle Database, Oracle Fusion Middleware, and Oracle applications for five years from the general availability date.

The second offering is called “Sustaining support”, which includes maintenance for as long as you use your Oracle software, with access to Oracle online support tools, upgrade rights, pre-existing fixes and assistance from technical support experts. These elements have major importance for enterprise companies, and can even be crucial for some of them.

If you’re asking why Oracle decided on the 3 year gap, that’s because it’s the average release time between Java versions (or more accurately, it used to be the average release time).

And indeed, Java 11 will offer LTS, and the next version that will provide this support will be released during September 2021, and currently has the codename 21.9. In case you’re still using an older version of Java, don’t worry, since Oracle stated that the support for Java 6, 7 and 8 would continue as to the current plans.

Final thoughts

The release of Java 9 marked the beginning of the evolution change for the Java platform. At first, we got project Jigsaw and saw a revolution in the way we think of and build large scale applications. Java 10 is about to introduce Local Variable Type Inference and help add some syntactic sugar to Java, and Java 11 comes with all of the above, plus long term support of the platform.

That doesn’t necessarily mean that you should wait for Java 11, but it does mean Java and Oracle are changing their tune. The fact that the company is investing in each one of its strong points – innovation and stability – is awesome news all around, and we have no doubt more great news is coming our way.

Published on Java Code Geeks with permission by Henn Idan, partner at our JCG program. See the original article here: Java 11 Will Include More Than Just Features

Opinions expressed by Java Code Geeks contributors are their own.

Henn Idan

Henn works at OverOps, helping developers know when and why code breaks in production. She writes about Java, Scala and everything in between. Lover of gadgets, apps, technology and tea.
Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments
Back to top button