SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 3 · Class Creation Flashcards Cheat Sheet Essentials Visual Review MC Practice FRQ Practice

AP Computer Science A Unit 3 Essentials

The must-know terms and core concepts for Unit 3: Class Creation. Every vocabulary word, class part, and idea you need to master.

← Back to Unit 3 hub
Key Concept 1
Classes bundle data and behavior, protected by encapsulation
A class is a template that defines instance variables (an object’s state) and methods (its behavior). Good design uses abstraction to expose only what a user needs. Encapsulation keeps implementation details hidden: instance variables are declared private so outside classes can’t change them directly, while behavior is exposed through public methods. This protects an object’s state and lets the class control how it is used.
Class Encapsulation private / public
Key Concept 2
Constructors and methods define how an object is built and used
A constructor (same name as the class, no return type) initializes a new object’s instance variables. Accessor (getter) methods return state without changing it, and mutator (setter) methods change it. Methods communicate through parameters and return values — and in Java, primitive arguments are passed by value, so a method works on a copy and cannot alter the caller’s original variable.
Constructor Accessor / Mutator Pass by Value
Key Concept 3
static members, scope, and this organize a class
A static variable or method belongs to the class rather than any object — there is a single shared copy, called with ClassName.member. Scope determines visibility: local variables live only inside their method, while instance variables are available throughout the object’s non-static methods. The this keyword refers to the current object and is used to distinguish an instance variable from a same-named parameter (this.field = field). Note that inheritance is outside the scope of AP CSA.
static Scope this
Class
A template defining an object’s state and behavior.
Design
Abstraction
Hiding complexity, exposing only what is needed.
Design
Encapsulation
Hiding data with private and exposing behavior with public.
Design
public
Access allowed from any class.
Access
private
Access restricted to the declaring class.
Access
Instance variable
Per-object state; each object has its own copy.
State
Constructor
Initializes a new object; same name as class, no return type.
Methods
Default constructor
Provided by Java if none is written; sets fields to defaults.
Methods
Accessor (getter)
Returns an instance variable without changing it.
Methods
Mutator (setter)
Changes an instance variable; usually returns void.
Methods
Parameter
A variable in a method’s header.
Methods
Argument
The value passed to a method when called.
Methods
Pass by value
Primitive arguments are copied into parameters.
Methods
Return type
The type of value a method returns (or void).
Methods
static variable
A class-level variable shared by all objects.
static
static method
A class-level method called with ClassName.method().
static
Local variable
A variable visible only inside its method or block.
Scope
Scope
The region of code where a variable is accessible.
Scope
this keyword
A reference to the current object.
this
Precondition / postcondition
What must be true before / after a method runs.
Docs