Card 08/ 08

RecapDifficulty: Advanced1 min

What Each of the Two Is For

Five things this topic established, and where each one was.

What the topic established, and which card it was on
The thingWhere
An interface names a capability and holds no per-object stateNaming What a Thing Can Do
An abstract class is a partly-built class, with fields and a constructorWhat an Abstract Class Adds
The deciding question is whether there is shared stateInterface or Abstract Class
A default method lets an interface grow without breaking implementationsdefault Methods
One extends, any number of implements, because interfaces add no fieldsWhy You Can Implement Ten Interfaces

State is the whole distinction. Everything else — how many you may have, what a default method may touch, why constants in an interface are shared — follows from an interface having none.