AP Computer Science A Review

Unit 2: Using Objects

Unit Overview

Unit 2 introduces the concept of an object, including calling methods of an object. This includes the methods of String objects, as well as the Math class methods.

Essential Knowledge

Classes vs. Objects

Constructors

Object Methods

// Example method signatures for Dog
void birthday()
void bark()
String getName()            // return type of String
int getAge()                // return type of int
void setName(String name)

About null

Miscellaneous