Java 21 (September 2023, LTS) delivered a generational leap cleanly matching Java 8: finalizing Virtual Threads (JEP 444), Pattern Matching for switch (JEP 441), Record Patterns (JEP 440), Sequenced Collections (JEP 431), Key Encapsulation Mechanism API (JEP 452) and opt-in Generational ZGC (JEP 439).
More lessons in Complete Core Java