Java 21, released as a “long term support” version, has a few nice features but nothing compelling to upgrade for except the tens of thousands of bug fixes. The major features of Java 21 include pattern matching for switch, record patterns, sequenced collections, and virtual threads. Pattern matching simplifies working with algebraic data types, while sequenced collections provide a more uniform method for reverse iteration. However, the truly momentous feature of Java 21 is virtual threads, which solve a major problem in concurrent programming. Overall, upgrading to Java 21 is recommended for the bug fixes and the potential benefits of virtual threads.
https://horstmann.com/unblog/2023-09-19/index.html