Kick off your book project in 3 hours! Live workshop on Zoom. You’ll leave with a real book project, progress on your first chapter, and a clear plan to keep going. Saturday, June 6, 2026. Learn more…

Leanpub Header

Skip to main content

Modern Java in Practice

Java 21 and Java 25 LTS, feature by feature. Records, virtual threads, pattern matching, structured concurrency, FFM, JFR, gatherers. One runnable Maven module per chapter. JDK-only, no framework noise. For engineers who shipped Java 11 and now have to update.

Minimum price

$22.00

$29.00

You pay

Author earns

$
EPUB
About

About

About the Book

Java 21 and Java 25 LTS, feature by feature. The catch-up read for engineers who shipped Java 11 and now need to write Java like it's 2026.

You wrote Java for a decade. Then the feature pace picked up. Records and sealed types in Java 17. Virtual threads and pattern matching for switch in Java 21. Java 25 is LTS. The standard library quietly added structured concurrency, the Foreign Function and Memory API, JFR streaming, stream gatherers, scoped values. Half the release notes were preview features that became standard three releases later. The team is on Java 21 in production and writing it like it's Java 11.

This book closes that gap. A feature tour of Java 21 LTS and Java 25 LTS, 22 chapters, one runnable Maven module per chapter. JDK-only by default. No framework noise.

What's inside:

- Language features: Records, sealed types, pattern matching for instanceof and switch, record patterns with guards, switch expressions, text blocks, var, unnamed variables, instance main methods.

- Concurrency: Virtual threads with the pinning gotcha and the synchronized warning, structured concurrency with StructuredTaskScope, scoped values, stable values.

- Standard library: java.net.http.HttpClient (sync, async, virtual-thread-friendly), sequenced collections, stream gatherers and custom intermediate operations, the parts of java.util most teams still under-use.

- Platform features: The Foreign Function and Memory API with a libcurl bridge, the Vector API, the Class-File API, modern GC choices (G1, ZGC, Generational ZGC, Shenandoah), JFR for production profiling, CDS, AppCDS, AOT (Project Leyden preview), jlink, jpackage.

Opinionated, not a feature catalog. Each chapter takes a position on whether the feature earns keystrokes. Records yes. Virtual threads for I/O-bound work with caveats. Pattern matching for the cases that used to be ten lines of instanceof. The places where the new feature is the right answer, and the places where the older form still wins.

Companion code: One runnable Maven module per chapter. Clone the repo and jump to the chapter you're reading.

Hard prerequisite: Working Java up to at least Java 11. This is not a Java tutorial. Readers landing from Java 17 already know half the material. Readers from Java 11 get the full upgrade story.

For: Working backend engineers writing Java in production.

Share this book

Author

About the Author

Umur Inan

Umur Inan is a Principal Software Engineer with 15 years of experience building backend systems across enterprise, government, and high-growth environments. He specializes in microservices architecture, distributed systems, and cloud-native development, with deep expertise in Spring Boot, Kafka, and Kubernetes. Based in New York City, he has shipped products across five countries and holds a Master's in Computer Science and a Bachelor's in Computer Engineering.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub