Java 21 is the first Java release with all essential pattern matching features finalized: sealed types and type patterns in an improved switch; also final (and very helpful) are records and record patterns. We'll explore how these language features come together to allow pattern matching, what that means for Java developers, and how we can push these features further to implement a new (to Java) programming paradigm: data-oriented programming. #RoadTo21 playlist: https://www.youtube.com/playlist?list=PLX8CzqL3ArzVHAHWowaXwYFlLk78D8RvL ~~~ Chapters ~~~ 0:00 Intro 1:31 Language Features extended instanceof: https://openjdk.org/jeps/394 switch expression: https://openjdk.org/jeps/361 patterns in switch: https://openjdk.org/jeps/441 sealed types: https://openjdk.org/jeps/409 & https://www.youtube.com/watch?v=652kheEraHQ 9:09 Pattern Matching 13:41 Data-oriented Programming records: https://openjdk.org/jeps/395 record patterns: https://openjdk.org/jeps/440 data-oriented programming: https://www.infoq.com/articles/data-oriented-programming-java/ & https://www.youtube.com/watch?v=5qYJYGvVLg8 unnamed patterns: https://openjdk.org/jeps/443 22:19 Outro Tags: #Java #Java21 #Design #CleanCode #OpenJDK