News

Think you've nailed the basics of Java pattern matching? Keep learning with these Java pattern matching examples involving records, inferred types and generics.
Basic pattern matching features (like enhanced instanceof) are available from Java 16 onward, while more advanced capabilities (like record patterns and guarded patterns) came up in Java 21.