Preface

Welcome! This book is a practical, modern-first reference to the Java platform as of December 2025, aligned to JDK 25. It is designed for engineers who want current best practices without legacy detours.

We focus exclusively on the latest Java language, platform, and library capabilities. Where a modern API or language construct supersedes an older approach, we use the modern one and explain migration tips when relevant.

Who This Book Is For

  • Intermediate to advanced Java developers who want up-to-date guidance
  • Engineers modernizing codebases to JDK 21+ and JDK 25
  • Performance-minded practitioners who care about JVM internals and tooling

What's Inside (12 Parts)

  • Part I — The Modern Java Platform: JDK cadence, JPMS, jlink, jpackage
  • Part II — Language: records, sealed types, pattern matching, collections
  • Part III — Concurrency: virtual threads, structured concurrency, reactive
  • Part IV — Foreign Function & Memory (FFM): MemorySegment, Arena, Linker
  • Part V — Core I/O & HTTP: NIO, async I/O, java.net.http, WebSocket
  • Part VI — Date-Time & I18N: java.time, formatting, localization
  • Part VII — Security & Crypto: TLS/SSL, KeyStore, permissions
  • Part VIII — JVM Internals & Performance: GC, JIT, CDS, JFR
  • Part IX — Monitoring & Diagnostics: JMX, logging, diagnostic tools
  • Part X — Modularity & Services: ServiceLoader, module layers, migration
  • Part XI — Reflection & Metaprogramming: reflection, method handles, APT
  • Part XII — Numerics & Vector API: RandomGenerator, BigDecimal, Vector API

Each part is divided into chapters and sections with real-world examples, benchmarks, and practical guidance.

Principles

  • Modern-only: avoid legacy APIs and deprecated constructs
  • Practical examples: runnable snippets and real-world patterns
  • Performance awareness: highlight cost models and trade-offs
  • Clear migration tips: show how to move safely to modern APIs

How To Read This Book

  • Skim the 12-part overview above, then jump directly to topics you need.
  • Prefer the modern approach shown; migration notes are included where helpful.
  • Use the Table of Contents for quick navigation across parts and chapters.