Preface
Twenty releases separate Java 7 from Java 27. This book connects the Java many of us first learned with the Java we write today, one concept at a time.
It began with a year-long course in 2013 that taught me Java in depth; About the Author tells that story.
What makes this book different
- It's a hike, not a catalogue. Features appear in the story of the concept they changed, not in a list of release notes. Each chapter starts where a Java 7 developer stands, then walks forward release by release, asking at each step: what problem did this change solve? If you know why a feature exists, you'll know when to use it.
- It corrects the classics. Some classic Java 7-era explanations were never quite right, like "the verifier removes viruses" or "a boolean takes one bit." Where those Java 7-era explanations were wrong, the book says so.
- Every example runs. Each example is a complete program, and every output shown comes from running it. An automated test suite checks them all against current Java releases.
- It's free to read.
How to read it
Read it front to back if you're new to Java. If you already write Java, skim each chapter's Key points and stop wherever something surprises you. The Quick Reference collects every chapter's key points on one page, and Java 7 → 27 at a glance maps the whole trail.
Conventions
| You'll see | It means |
|---|---|
| Java 21 | The release that introduced or finalized a feature |
| Key points box | The chapter's main ideas, for skimmers |
| What changed box | How a release changed the concept |
| Common mistake box | A trap, or a correction to a classic misconception |
| Migration tip box | Advice for upgrading older code |
| The classic rule box | A Java 7-era rule, checked against modern Java |
| Rule box | A short rule worth memorizing |
code/ch01/Hello.java |
The example's source file, runnable from the book's GitHub repository |
Thank you
To the teachers who first put BlueJ in front of a curious twelve-year-old, to the instructor whose Java course started it all, and to the OpenJDK community, whose careful work over twenty releases gave this book its story.
— Kshittiz Kumar, 2026