PatternMatching
3 items
Series Posts
Part 6: Java 14 & 15: Records, Text Blocks, and Sealed Classes
Java 14 finalised switch expressions and previewed records and pattern matching for instanceof. Java 15 made text blocks production-ready, introduced sealed classes in preview, and delivered the long-awaited helpful NullPointerExceptions. Together they laid the groundwork for modern Java's data-oriented programming model.
Part 7: Java 16 & 17: The Modern LTS Baseline
Java 16 finalised records and pattern matching for instanceof. Java 17 became the new LTS release, finalising sealed classes and introducing pattern matching for switch in preview. Together they define the modern Java baseline that most teams target today.
Part 9: Java 21: The Concurrency Revolution — LTS
Java 21 is a landmark LTS release. It finalised virtual threads (Project Loom), sequenced collections, record patterns, and pattern matching for switch — while previewing string templates and unnamed classes. It is the most feature-rich LTS release since Java 8.