Refactor Your Code to Java 20
summary
Walks through concrete migrations from Java 10 to Java 21 with live examples: var local type inference to remove repetitive types, Java 15 text blocks and Java 21 string templates for multiline and templated HTML, Java 14+ switch improvements including switch as expression, arrow labels, case null, yield and type-patterns, pattern matching for instanceof and record deconstruction in for-each (Java 20 preview requires enabling), records as immutable data classes replacing boilerplate equals/hashCode/toString, Unicode emoji changes (Java 19), javadoc code snippets, sealed classes, and automation via IntelliJ/Eclipse refactors, OpenRewrite, SonarQube and Maven plugins.
AI-written summary · about
chapters (9)
- 0:00Introduction and goals
- 6:35Local variable type inference
- 10:07Modern switch statements
- 22:16Emoji support in Java
- 27:26Records for boilerplate
- 34:27Java 20 record improvements
- 39:38Code snippets in documentation
- 46:04Sealed classes overview
- 49:37Poll and closing
related talks
01h 11mModern Java: This is not your father's Java anymore
51m#JavaNext Language Features
46mWhat's new in Java 19 and 20
59mFrom Legacy to Cutting-Edge: Live Refactoring Java 8 to 24
52mTo Java 21 and Beyond!
01h 02mJava 11 to 21 Evolution!
43mKeeping Up With Java
55mA Few New Cool Features in Modern Java
