1/49
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Class
A programmer-defined type in Java that bundles data (state) and operations (behavior); a blueprint for creating objects.
Object
An entity created from a class (typically using new) that has its own state and can perform behaviors via methods.
Instance
A specific object created from a class; each instance has its own copy of the class’s instance variables.
State
The information an object stores, represented by its instance variables (fields).
Behavior
The actions an object can perform, implemented by methods.
Instance Variable (Field)
A per-object variable that stores state; each object has its own separate copy.
Method
A named block of code in a class that can read/change object state and/or return a value.
Constructor
A special block of code that runs when an object is created to initialize instance variables; same name as class and no return type.
Instantiation
The process of creating an object from a class, typically using the new keyword.
new Keyword
Java keyword used to create a new object and run its constructor.
Primitive Type
A basic built-in type like int, double, boolean (not an object reference).
Encapsulation
Design principle of hiding an object’s data with private fields and providing controlled public methods to interact with it.
Access Modifier
A keyword like public or private that controls where a class/member can be accessed from.
public
Access level meaning usable from outside the class; commonly used for constructors and methods meant for other code to call.
private
Access level meaning accessible only within the same class; commonly used for instance variables to protect state.
Class Invariant
A rule/condition that should always be true for a valid object (e.g., balance not negative, hours 0–23).
Accessor (Getter)
A method that returns information about an object without changing its state (e.g., getBalance()).
Mutator
A method that changes an object’s state (e.g., deposit, withdraw, setAge).
Validation
Checking inputs (often in mutators/constructors) to prevent an object from entering an invalid state.
Method Signature
The method name plus parameter types (and in AP practice, you closely track return type as well).
Return Type
The type of value a method promises to return (or void if it returns nothing).
void Method
A method that performs an action but returns no value; its result cannot be used in an expression.
Parameter
An input to a method/constructor; a local variable that exists only during the call.
Local Variable
A variable declared inside a method or block that exists only within that method/block.
Scope
The region of code where a variable can be used (e.g., a variable declared in an if block can’t be used after the block).
Side Effect
A change that persists after a method finishes, such as updating an instance variable.
this Keyword
A reference to the current object whose method or constructor is executing; used to refer to fields explicitly.
Shadowing
A bug-prone situation where a parameter/local variable name is the same as a field name, hiding the field within that scope.
Constructor Overloading
Providing multiple constructors with different parameter lists to support different valid ways to create an object.
No-Argument Constructor
A constructor you explicitly write with no parameters (e.g., public Point() { ... }).
Default Constructor
A no-argument constructor Java automatically provides only if you write no constructors at all.
Constructor Chaining (this(...))
Calling one constructor from another in the same class using this(...); it must be the first statement in the constructor.
static
Keyword indicating a member belongs to the class itself (shared), not to individual objects.
Static Variable
A class-level variable with one shared copy across all instances (e.g., counting how many objects were created).
Static Method
A class-level method that has no implied this and cannot directly access instance variables without an object reference.
static final Constant
A shared, unchangeable value (constant) used to avoid “magic numbers” (e.g., public static final double PI = ...).
Public API
The set of public constructors/methods a class exposes so other code can use it without accessing internal fields.
toString Method
A method that returns a String representation of an object; used automatically when printing an object reference.
Overriding
Providing a new version of a superclass method (like toString) with the same header to customize behavior.
@Override Annotation
Optional marker that helps catch mistakes when overriding; causes a compile-time error if the method doesn’t correctly override.
String Concatenation
Building strings using + (often in toString); formatting must match required output exactly.
Reference Variable
A variable that stores a reference (not the whole object); it points to an object in memory.
Aliasing
When two reference variables point to the same object; changes through one reference are visible through the other.
null Reference
A reference value meaning “no object”; attempting to call methods on it causes a runtime error.
NullPointerException
Runtime error that occurs when code tries to use a null reference as if it referred to an object.
== (Reference Equality)
For objects, checks whether two references point to the exact same object (identity), not whether contents match.
.equals(...) (Logical Equality)
A method (in many classes) used to compare object contents/meaning rather than reference identity.
Pass-by-Value
Java argument passing rule: methods receive copies of values; for objects, the copied value is the reference (so the object can still be mutated).
Driver/Tester
A separate class/program (often with main) used to construct objects and call methods to verify behavior.
Tracing Object State
Following how instance variables change across a sequence of statements/method calls, especially with multiple objects or aliasing.