Kategorie: Java 20
-
Java 20: Record Patterns and the enhanced For Loop
With Java 20 released, Project Amber further iterated on Record Patterns with JEP 432, the second preview of this new feature. This time they implemented support for record patterns in the enhanced for loop. If you don’t know what record patterns are, just check out my previous post about the topic, which explains this new…
-
Java 20: Scoped Values
Java 20 has been released in mid of March and Project Loom brought us Scoped Values as a new incubator feature with it, which is supplementing the previously released Virtual-Threads and Structured Concurrency preview features. Scoped Values are meant to replace and enhance the ancient ThreadLocal variables, introduced in Java 1.2 about 25 years ago.…