Card 09/ 09

RecapDifficulty: Intermediate1 min

Recap: Classes and Objects

Classes, new, constructors, the default constructor, this and static, with where each was.

Classes and objects come down to the five ideas below, each listed with the card that covers it.

What the topic established, and which card it was on
The ideaWhere
A class describes; new creates; a reference pointsClasses and Objects: A Description and Its Instances
A constructor is named for the class, declares no return type, and runs inside newJava Constructors: Making an Object Valid From the Start
Constructors are chosen by argument list, and this(...) chains themConstructor Overloading Example: Two Ways to Create an Order
Writing any constructor removes the default no-argument oneThe Default Constructor Disappears When You Write One
static belongs to the class; instance members belong to one objectstatic vs Instance Members

An object has its own copy of every instance field, and that is the only thing it has that the class does not. Everything else in this topic follows from asking which of the two something belongs to.