Local variable type inference
Removes redundant code and saves a lot of typing.
- The takeWhile() operation processes the items of a collection and keeps each one while a given condition is true.
- The dropWhile() operator does the opposite: It disregards the items of a collection while the predicate is true.
Java 12 introduced switch expressions, which enable you to use switch to directly assign a value to a variable.
Records are great for simple classes that only need to contain fields and access to those fields.
It allows you to use three quotation marks to open and close a big block of text.