Modern Java Puzzlers
summary
Shows concrete failures and surprises: switch expressions require exhaustiveness while legacy switch statements do not, but using enhanced switch or case null reintroduces exhaustiveness checks and compiler errors. Demonstrates JDK23 features with primitives in patterns, runtime matching that can prefer byte over int, and many examples where autoboxing/unboxing and pattern dominance cause missing return or dominated case errors. Ends with contextual keyword and Unicode tricks that change tokenization and compilation.
AI-written summary · about
chapters (7)
- 0:00Welcome
- 1:59Modern Java and switch expressions
- 12:43Primitives and pattern matching
- 31:39Guarded patterns and switches
- 43:21Sealed classes and keywords
- 47:30Unicode code comments
- 49:14Summary
related talks
57mJava Puzzlers S03
46mThe Art of Java Type Patterns
32mGetting the Most from Modern Java
46mThe Art of Java Type Patterns
50mPattern Matching in Java Deep Dive
54mJava Puzzlers NG: The strange, the bizarre, and the wonderful
29mThe Art of Java Language Pattern Matching
01h 11mModern Java: This is not your father's Java anymore
