1/23
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Constructor
A special method used to create an instance of a class using the new keyword.
Default Constructor
A constructor automatically provided by Java with an empty parameter list and body if no constructors are defined in a class.
No-Argument Constructor
Another name for the default constructor, which takes no parameters.
this keyword
Used to refer to instance variables when they have the same name as constructor parameters.
Constructor Overloading
The ability to have multiple constructors in a class with different type parameters.
Constructor Chaining
The process where one constructor calls another constructor with a greater number of parameters.
Encapsulation
The concept of hiding an object's data and methods from outside access.
Fields
Variables that hold the state of an object within a class.
Accessor Method
A public method that retrieves data from a private instance variable.
Mutator Method
A public method that modifies the data in one or more private instance variables.
Immutable Class
A class that does not change after an object of another class is created.
Inheritance
A mechanism that allows a class to inherit attributes and behaviors from another class.
Subclass
A class that is derived from another class, also known as a derived class or child class.
Superclass
The class from which a subclass is derived, also known as a base class or parent class.
Object Class
The root class in Java from which all classes inherit, with no parent classes.
Final Modifier
A keyword used to prevent a class from being extended.
Private Fields
Instance variables in a superclass that cannot be accessed directly by its subclass.
Constructor Rules
Guidelines that dictate how constructors should be defined and called in Java.
super() Command
A call to the parent class constructor that must be the first statement in a child class constructor.
No-Argument Super()
An automatically inserted call to the parent class's no-argument constructor if none is explicitly declared.
Explicit Parent Constructor Call
Required when the parent class does not have a no-argument constructor and the child class defines constructors.
Parent Constructor Execution
The parent constructor is executed before the child constructor during object creation.
Method Overriding
The ability to define a new version of an existing method in a subclass that uses the parent class's method definition.
Overriding Method Requirements
The new method in the subclass must have the same name, parameter list, and return type as the parent class method and must be at least as accessible.