and Objects- Questions and Answers
Unreachable statements ✔️✔️Unreachable statements are those that cannot be executed
because the logical path can never encounter them; an unreachable statement causes a
compiler error.
Dead code ✔️✔️A set of statements that are logically unreachable.
is-a relationship ✔️✔️The relationship between an object and the class of which it is a member.
Instantiation ✔️✔️An instantiation of a class is an object; In other words, it is one tangible
example of a class.
Class client (class user) ✔️✔️An application or class that instantiates objects of another
prewritten class.
Extended (class) ✔️✔️Classes can be extended, or used as a basis for any other class.
Data fields ✔️✔️Data variables declared in a class outside of any method.
Instance variables ✔️✔️The instance variables of a class are its data components.
Private access ✔️✔️Assigning private access to a field means that no other classes can access the
field's values, and only methods of the same class are allowed to set, get, or otherwise use
private variables.
, Information hiding ✔️✔️The object-oriented programming principle used when creating private
access for data fields; a class's private data can be changed or manipulated only by a class's own
methods and not by methods that belong to other classes.
Mutator methods ✔️✔️Mutator methods set values.
Accessor methods ✔️✔️Accessor methods retrieve values.
Instance methods ✔️✔️Nonstatic methods, those methods used with object instantiations, are
called instance methods.
Primary key ✔️✔️A unique identifier for data within a database.
new operator ✔️✔️Allocates the memory needed to hold an object.
Reference to an object ✔️✔️The name for a memory address where the object is held.
Constructor ✔️✔️A method that establishes an object.
Default constructor ✔️✔️One that requires no parameters; if you do not write one, a default
constructor is created for a class automatically by the Java compiler.
Abstract data type ✔️✔️A type whose implementation is hidden and accessed through its public
methods.
Programmer-defined data type ✔️✔️One that is created by a programmer and not built into the
language.