Java 20 pattern matching for switch: what’s under the hood?
Pattern matching for switch statements and expressions has been evolving for a couple of latest releases. We can already play with the most exciting changes, such as pattern guards and record patterns, in the Java 19 and 20 preview versions.
Source: Java 20 pattern matching for switch: what’s under the hood?, an article by Nataliia Dziubenko.