From the course: Pattern Matching for Switch in Java 21

Learning about pattern matching for switch - Java Tutorial

From the course: Pattern Matching for Switch in Java 21

Learning about pattern matching for switch

- [Buddhini] Traditionally, a switch statement could only match against a number, string, or an enum constant. Pattern matching for switch is a modern feature introduced in Java 21 that enhances the traditional switch by allowing you to match against types and not just constants. You will learn about type patterns, patterns and case labels, the null case label, and a few other topics. By the end of this course, you will learn everything you need to know about using pattern matching with switch. Hi, I'm Buddhini Samarakkody, a Java engineer, author, instructor, and a trainer. Come and join me in this course to learn about pattern matching with switch in Java.

Contents