

Java EE).īoth the Java EE and CORBA modules have been removed. JavaFX), or expecting applications to use external dependencies that were already available (e.g.

This step not only affects deprecated features and functionality that wasn’t used much, it also aims to simplify the core of the language by moving some large sections into separate dependencies (e.g. Java 11: Be aware, the APIs you use may not be there any moreĪs well as new language features, it’s important to understand that Java 11 actually removes features. Note that this is suggested when you press Alt+Enter on the type, it’s not flagged as a warning in the code. In Java 11, we can make this a little shorter using var instead of the parameter types, and IntelliJ IDEA can do this conversion for you. Annotations appear next to the type, so prior to Java 11 this would have meant code with an annotation might look something like: BiConsumer consumer = Processor x, String y) -> x.process(y) The main use case for this is when a parameter requires an annotation. Java 10 introduced var for local variable types, which we’ll talk about a bit later in this post, and Java 11 took this further to allow var on lambda expression parameters. IntelliJ IDEA lets you remove these types if you wish: But you didn’t need to include this type information as it was already known – in this case, the BiConsumer on the left declares these two types with generics. The type information is included for the x and y parameters. When lambda expressions were introduced in Java 8, you could write something like this: BiConsumer consumer1 = (Processor x, String y) -> x.process(y) We’ve already blogged about this in the context of Java 11 support in IntelliJ IDEA 2018.2, but let’s cover it again quickly. From an IntelliJ IDEA point of view, there’s really only one feature that benefited from some extra support in the IDE, and that was JEP 323: Local-Variable Syntax for Lambda Parameters. Java 11, like Java 10 before it, has a fairly short list of new features, which is a good thing for us developers as it’s much easier to see what may be interesting and useful to us. This new six monthly release cadence is a big change for the Java community, and a welcome one – Java developers are getting small drops of interesting new features regularly.

This week Java 11 was released! It feels like only yesterday that we was saying the same thing about Java 9.
