In Data-Oriented Programming in Java you’ll learn what you might have thought was impossible: how to use Java’s type system to make code self-documenting, implicit behaviors explicit, and incorrect states impossible to even compile. This practical book teaches you how to use records, sealed classes, and pattern matching to represent the data in your domain, explore data’s inherent meaning and semantics, and represent them in their code. Each new concept is fully illustrated with a hands-on example that demonstrates how DOP helps you write scalable, testable, and maintainable code.