Java After Eleven
summary
A small Java 11 codebase that turns Markdown into a recommendations JSON is updated live to Java 17 and preview 18/19 using SDKMAN, IntelliJ and Maven; the demo runs the program 10 times (first run ~1.4s) and produces the JSON successfully. Concrete rewrites include replacing nested CompletableFuture joins with exceptionallyCompose, switching to expression-style switch cases, using text blocks and instance String.format, converting tiny data holders to records, adding pattern matching for instanceof and sealed types, and enabling pattern-matching switch.
AI-written summary · about
chapters (15)
- 0:00Introduction to Java after 11
- 1:09Why upgrade from Java 11
- 3:15Updating to Java 12 demo
- 5:02CompletableFuture improvements in Java 12
- 6:47Switch expressions in Java 14
- 9:33NullPointerException enhancements in Java 14
- 12:20Text blocks in Java 15
- 15:47String format improvements in Java 15
- 16:50Records in Java 16
- 18:33Records for quick data classes
- 21:04Type patterns in Java 16
- 23:29Sealed types in Java 17
- 25:34Pattern matching in switch Java 19
- 29:08Java 17 performance improvements
- 29:51Q&A on Java features
