Java Feature Spotlight: Pattern Matching


Java SE 14 (March 2020) introduced a limited form of pattern matching as a preview feature, which becomes a permanent feature in Java SE 16 (March 2021)…

More at https://www.infoq.com/articles/java-pattern-matching/