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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |