1/12
Looks like no tags are added yet.
constructor
used in the creation of an object that is an instance of a class using the new keyword. Constructors are never inherited and use the name of the class and have no return type.
default constructor
a constructor with an empty parameter list and body. This is invisibly added to the class. It is also known as a no-argument constructor.
This
keyword is used when the instance variable has the same name with the constructor’s parameter.
Constructor overloading
occurs when constructors have different type parameters.
constructor chaining
When a constructor calls another constructor with a greater number of parameters, it is called _____________ This is accomplished using the this keyword too. The this() call must be the first statement in the constructor.
Encapsulation
describes the ability of an object to hide its data and methods.
accessor
a getter method is a public method that returns data from a private instance variable.
mutator
a setter method is a public method that changes the data stored in one or more private instance variables.
immutable
A class is considered _________ if it remains unchanged after an object of another class is constructed. For a class it removes the setter methods and use the constructor for setting the values.
Inheritance
allows a class to acquire all the attributes (fields) and behaviors (methods) of another class.
subclass
A class that is derived from another class is called a
superclass
The class from which the subclass is derived is called a
method overriding
You can define a new version of an existing method in a child class that makes use of the definition in the parent class. This ability is called