


In its fourth preview, Pattern Matching for switch improves its usage when working with exhaustive switch, simplified switch labels and inferring type arguments for generic Record Patterns. In its second preview, Record Patterns improves support for generic Record Patterns and lets you use Record Patterns in enhanced for statements. It introduces Scoped Values as an incubating API to support virtual threads by enabling sharing of immutable data within and across threads. I’ve been writing about the new Java releases for a while now (since Java 10) and I like how we developers get to know about and use the new Java features every six months.Ĭompared to some of its previous releases, Java 20 adds relatively fewer features.
