Java 11 was released in Septemper 2018 six months after Java 10 conforming to Oracle's new six-month release cycle.
Following are some key new features of Java 11.
1. New methods in String class - Following new methods are added in the String class which help in manipulating String objects and reduce boilerplate code.
2. Local-Variable Syntax for Lambda Parameters The reserved type name 'var' (local variable syntax) can now be used when declaring the formal parameters of a lambda expression. This enables us to apply modifiers such as type annotations to lambda parameters.
New dafault toArray() method in Collection - A new default method toArray(IntFunction) has been added to the java.util.Collection interface. This method allows the collection's elements to be transferred to a newly created array of a desired runtime type.
String[] strArray = list.toArray(String[]::new)
HttpClient - The new HTTP client introduced in Java 9 which supports HTTP2 is now a standard feature in Java 11.