Language Enhancements:
varin Lambda Expressions: Java 11 allows the use ofvarkeyword for local variable type inference in lambda expressions, improving readability and consistency.
2. New APIs:
String::isBlank(): Checks if a string is empty or contains only whitespace characters.
String::strip(): Removes leading and trailing whitespace, handling Unicode characters correctly.
String::lines(): Returns a stream of lines from a string.Files::readString(): Reads the entire content of a file into a string.HttpClient: A new, asynchronous, and non-blocking HTTP client API supporting HTTP/1.1 and HTTP/2.Predicate::not(): A static method that negates a predicate.
- New
toArraymethod: A newtoArraymethod in theCollectioninterface that takes anIntFunctionargument for more convenient array creation.
No comments:
Post a Comment