Programming Concepts - Part 2
T/F: Instance methods should be declared static.
False
T/F: The public access specifier for a field indicates that the field may not be accessed by statements outside the class.
False
T/F: The term "default constructor" is applied to the first constructor written by the author of the class.
False
T/F: Instance methods do not have the key word static in their headers.
True
T/F: Shadowing is the term used to describe where the field name is hidden by the name of a local or parameter variable.
True
One or more objects may be created from a(n) ________.
class
It is common practice in object-oriented programming to make all of a class's ________.
fields private
Overloading means that multiple methods in the same class ________.
have the same name but different parameter lists
Methods that operate on an object's fields are called ________.
instance methods
Instance methods do not have the ________ key word in their headers.
static
The scope of a public instance field is ________.
the instance methods and methods outside the class
The scope of a private instance field is ________.
the instance methods of the same class
Data hiding (which means that critical data stored inside the object is protected from code outside the object) is accomplished in Java by ________.
using the private access specifier on the class fields