AP® Computer Science A glossary
Object
Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods
A specific instance of a class with defined attributes.
Appears in the course and exam description (CED): 1.12.A.1
Each object has its own attribute values. Changing one object does not change another object of the same class.
Plant fern = new Plant("Fern", 30);
Plant mint = new Plant("Mint", 12);
fern.grow(4);
System.out.println(fern.getHeight() + " " + mint.getHeight());
Output:
34 12 Learn it properly, with a checkpoint 1.12 Objects: Instances of Classes