Part I: Foundations — What Changed and Why
Chapter 1: The Modern Java Revolution
Chapter 2: Records — Immutability as the Default
Chapter 3: Sealed Classes — Exhaustive Type Hierarchies
Chapter 4: Pattern Matching — From instanceof to Deconstruction
Chapter 5: Virtual Threads — Rethinking Concurrency Patterns
Part II: Creational Patterns — Building Objects the Modern Way
Chapter 6: Singleton Pattern
Chapter 7: Builder Pattern
Chapter 8: Factory Method & Abstract Factory
Chapter 9: Prototype Pattern
Chapter 10: Object Pool Pattern
Part III: Structural Patterns — Composing Objects
Chapter 11: Adapter Pattern
Chapter 12: Decorator Pattern
Chapter 13: Proxy Pattern
Chapter 14: Composite Pattern
Chapter 15: Flyweight Pattern
Chapter 16: Facade Pattern
Chapter 17: Bridge Pattern
Part IV: Behavioral Patterns — How Objects Interact
Chapter 18: Strategy Pattern
Chapter 19: State Pattern
Chapter 20: Observer Pattern
Chapter 21: Command Pattern
Chapter 22: Iterator Pattern
Chapter 23: Mediator Pattern
Chapter 24: Memento Pattern
Chapter 25: Chain of Responsibility Pattern
Chapter 26: Interpreter Pattern
Chapter 27: Command Query Responsibility Segregation (CQRS)
Chapter 28: Event Sourcing
Part V: Concurrency Patterns — Virtual Threads Change Everything
Chapter 29: Thread Pool Pattern (Obsolete for I/O)
Chapter 30: Active Object / Actor Pattern
Chapter 31: Future/Promise Pattern (Async to Sync)
Chapter 32: ThreadLocal Pattern
Chapter 33: Balking Pattern
Part VI: Modern Patterns — New to Java 21-25
Chapter 34: Functional Programming Patterns
Chapter 35: Data-Oriented Programming (DOP) Patterns
Chapter 36: Builder-like Patterns with Records and with methods
Chapter 37: Algebraic Data Types (ADTs) with Sealed Classes and Records
Chapter 38: Functional Error Handling with Either or Result types
Part VII: Anti-Patterns — What to Avoid in Modern Java
Chapter 39: Modern Java Anti-Patterns
Chapter 40: Migrating Legacy Patterns
Part VIII: Appendices
- Appendix A: Java Version Feature Matrix
- Appendix B: Before/After Cheat Sheet
- Appendix C: IDE Setup for Modern Java