1/20
A set of vocabulary flashcards covering Java class design, object-oriented principles, and method fundamentals based on the lecture transcript.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Instance Variable
A variable defined in a class for which each instantiated object of the class has its own copy.
Encapsulation
The practice of keeping the internal state of an object hidden from the outside world and only exposing it through a controlled interface (methods).
Constructor
A special method used to initialize the state of a new object. It has the same name as the class and no return type.
Static (Class Variable/Method)
A keyword indicating that a member belongs to the class itself rather than to any specific instance.
Access Modifier
Keywords like public and private that control the visibility and accessibility of classes, variables, and methods.
this Keyword
A reference to the current object whose method or constructor is being called.
Procedural Abstraction
The concept of using a method by knowing what it does without needing to know how it is implemented.
Data Abstraction
Separating the logical properties of a data type from the concrete details of its implementation.
Return Type
The data type of the value a method sends back to the caller (e.g., int, double, boolean). Use void if no value is returned.
Local Variable
A variable declared inside a method or constructor that only exists within that specific block of code.
Object State
The state of an object is defined by the current values of its instance variables.
Scope
Instance variables are accessible throughout the entire class, while parameters and local variables are only accessible within their specific methods.
Default no-argument constructor
Provided by Java automatically if you do not write a constructor.
Accessor Methods (Getters)
Used to "get" or return the value of a private instance variable; they must have a return type matching the variable.
Mutator Methods (Setters)
Used to "set" or update the value of a private instance variable.
void methods
Methods that perform an action but do not return data.
non-void methods
Methods that must return exactly one value of the specified type.
Static Variables
Shared across all instances of a class; often used for counters or constants.
Static Methods
Methods called using the Class name (e.g., Math.sqrt()); they cannot use the this keyword or access instance variables.
Pass-by-Value
The mechanism by which Java passes arguments; primitives pass a copy of the value, and object references pass a copy of the memory address (reference).
Variable Shadowing
Occurs when a parameter has the same name as an instance variable; resolved by using this.variableName.