Earlier quoted context omitted.
both suggestions here are for books that cover java 8. how is it possible that java 8 is modern relative to java 21?
Modern Java in Action (the 2nd edition of Java 9 in Action) covers Java 11 and contains a final chapter that talks about "future Java" features -- many of which are now implemented. It's a great book for Java programmers who want to make the jump to functional-style programming. If that's the transition one is hoping to make, then I would definitely recommend the book.
https://www.manning.com/books/the-well-grounded-java-develop...