Chapter 10
Understanding Java Interfaces and Abstract Classes
This book now arrives at the coup de grace of object-oriented programming: making use of abstract types. It can be a hard topic to get a handle on, but the payoff is huge. Once you’re able to think about method naming first and then decide how you’re going to make your methods work second, you’re ready for abstract types. It’s a tall order. Believe me, I know it. And so, in this chapter I’m going to use one extended example to tell a kind of story, with some side examples to make individual points along the way. Abstract typing is a design process, and design means working out relationships over multiple revisions. I’ll therefore spend less time touching on every compiler rule—although ...
Get Java SE 7 Programming Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.