A new garbage collector was introduced in Java 11, a low latency/high scalability GC called ZGC. And now, with Java 21, it has evolved into a generational GChugo .
Pattern matching is a declarative and composable approach for more powerful and expressive code. Java 16 added pattern matching for the instanceof operator, and we looked at pattern matching for switch before. Let’s look at another new kind of pattern matching: Record Patterns.
Even though Java is one of the most backward-compatible languages and environments I’ve ever worked with, there’s always the possibility of feature deprecations and even removals.
Knowing how to debug a problem is essential in any project. But there’s way more to it than just stopping at a certain point with a breakpoint. From running custom code, over symbolic breakpoints, to sharing breakpoints via Git, Xcode has something for everyone.
The switch control structure has quite an evolution lately since its inception. First, there were switch expressions (JEP 325, 354, 361). And now, we get pattern matching for switch statements and expressions!
Today we look at Scoped Values, another interesting preview feature that’s incubating since Java 20 (JEP 429). It’s a new way to store and share immutable data with a bounded lifetime within a thread and its child threads.