Java
Dealing with Collections is improving with Java 21, as three new interfaces get retro-fitted right into the existing type hierarchies. These Sequenced Collections give us a uniform API to access the first and last elements, and process Collections in reverse.
Java’s known (and often criticized) for its vast amount of required boilerplate and ceremony for perceived mundane tasks, at least compared to other languages. JEP 445 is explicitly targeted to make the first introduction to Java a breeze, though.
Java’s String type is a ubiquitous type that’s used in every program out there. Over the years, it received many improvements. And now, another exciting improvement is coming that makes String safer and easier to use: String templates.
Java 21 has recently entered “rampdown phase one”, and is planned for general availability in September! This new LTS release comes with many new features, that’s why I want to take the next few weeks to take a deeper look at the ones that excite me the most!
I’m happy to announce that my book, “A Functional Approach to Java: Augmenting Object-Oriented Java Code with Functional Principles” is finally available 🥳
Besides lambdas expressions, Java 8 introduced another language syntax change in the form of a new operator, :: (double colon), to create so-called method references.