An abstraction hides details. A good abstraction hides the right details at the right time so that we can
manage __________.
A. Capacity
Each _______ clause on a try statement handles a particular kind of exception that may be thrown within
the try block.
D. None of the above
The versions of an overloaded method are distinguished by their ___________. The number, type, or order
of their parameters must be distinct.
D. None of the above
A _______ is a blueprint for an object; it reserves no memory space for data. Each object has its own data
space, and thus its own state.
D. None of the above
The ________ of a variable, which determines where it can be referenced, depends on where it is declared.
A. Type
A __________ variable is shared among all instances of a class.
A. Instance
Several references can refer to the same object. These references are ________ of each other.
A. Copies
The toString and equals methods are defined in the Object class and therefore are ________ by every
class in every Java program.
D. None of the above
Visibility modifiers determine which variables and methods are inherited. ___________ visibility provides
the best possible encapsulation that permits inheritance.
A. Public
A child class can _________ (redefine) the parent’s definition of an inherited method.
D. None of the above
A class derived from an abstract parent must __________ all of its parent’s abstract methods, or the derived
class will also be considered abstract.
A. Use
A reference variable can refer to any object created from any class related to it by ___________.
A. Reference
A __<package>__ is a Java language element used to group related classes under a common name.
An object reference variable stores the __<address>__ of an object.
A variable declared in a method is __<local>__ to that method and cannot be used outside of it.
aliases of each other.
appropriate.
If an object has no references to it, a program cannot use it. Java performs __<automatic garbage
A __<wrapper>__ class represents a primitive value so that it can be treated as an object.
The child of one class can be the parent of one or more other classes, creating a class __<hierarchy>__.
An __<abstract>__ class cannot be instantiated. It represents a concept on which other classes can build
their definitions.
on the particular object being referenced at the time.
The messages printed by a thrown exception indicate the nature of the problem and provide a __<method
True/False. The new operator returns a reference to a newly created object.
responds define its state.
True/False. Objects should be encapsulated. The rest of a program should interact with an object only
through a well-defined interface.
each other.
True/False. A method is made static by using the static modifier in the method
declaration.
True/False. Inherited variables and methods can be used in the derived class as if they had been declared
locally.
maintenance efforts.
interface.
which version of a method to invoke.
can refer to any object of any class that implements the interface.
What is the difference between an object and a class?
Objects should be self-governing. Explain.
Describe each of the following:
a. public method
b. private method
c. public variable
d. private variable
What are constructors used for? How are they defined?
How are overloaded methods distinguished from each other?
What is an aggregate object?
What is the difference between a static variable and an instance variable?
What is the difference between a class and an interface?
Describe the relationship between a parent class and a child class.
What relationship should every class derivation represent?
What is the significance of the Object class?
What is polymorphism?
How is overriding related to polymorphism?
How can polymorphism be accomplished using interfaces?