For more info on the next Devoxx UK event 👉 www.devoxx.co.uk The releases of the JDK 17 to 20 bring interesting features in the Java language: sealed types, pattern matching for switch (as a preview feature), and records. With the new Record pattern matching, the implementation of pattern matching in the Java language begins to take shape. The JDK 20 brings an updated preview of Record pattern matching, that further simplifies your code, while making it safer. In this presentation we show you how you can leverage records and sealed types with switch expressions to improve the modularity of your application. You will see pattern matching in action on real examples, how it will change the way you write Java code, and what you can expect on this topic in the future. It is mostly a live coding presentation, with some slides when the code shown cannot be executed.