Java 22 has many language features that Java 8 could only dream of - let's see what (dirty) tricks we can play with them: We'll see how to pattern-match `Optional`, how to expand a sealed type hierarchy, why nested switches may (?) be good for documentation, and how a reverse `instanceof` check is both elegant and questionable. We'll also go into text block line endings and filtering streamy by type.
0:00 Intro
1:13 Expandable Sealed Types
3:00 Nesting Switches
5:22 Reverse Instanceof
6:36 Filter A Stream By Type
7:38 JDK 22 Launch Stream https://dev.java/community/java-22-launch/
8:11 Switching Over Optional
9:53 Text Block Line Endings
12:04 Good or Dirty?
12:58 Outro