Absolute Java 6th Edition Chapter 8

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

A class with no abstract methods is called a (a) concrete class (b) encapsulated class (c) abstract class (d) private class

A

The clone method has ________ parameters. (a) zero (b) one (c) two (d) three

A

____________ refers to the process of associating a method definition with a method invocation. (a) Binding (b) Encapsulation (c) Inheritance (d) Polymorphism

A

A method marked as final means the compiler uses ________ binding. (a) dynamic (b) early (c) late (d) none of the above

B

An abstract class must have the modifier ___________ included in the class heading. (a) static (b) abstract (c) final (d) private

B

The clone method return type is: (a) the same as the cloned object (b) Object (c) String (d) none of the above

B

A class that has at least one abstract method is called an: (a) concrete class (b) encapsulated class (c) abstract class (d) private class

C

An abstract method cannot be modified by: (a) public (b) protected (c) private (d) none of the above

C

Assigning an object of a derived class to a variable of a base class is called: (a) static binding (b) dynamic binding (c) upcasting (d) downcasting

C

If you choose to use the method clone in your code, you must ___________ the clone method. (a) overload (b) encapsulate (c) override (d) protect

C

__________ binding refers to the method definition being associated with the method invocation when the code is compiled. (a) Dynamic (b) Late (c) Early (d) None of the above

C

__________ refers to the ability to associate many meanings to one method name by means of the late binding mechanism. (a) Inheritance (b) Encapsulation (c) Polymorphism (d) None of the above

C

Assigning an object of an ancestor class to a descendent class is called: (a) static binding (b) dynamic binding (c) upcasting (d) downcasting

D

Java does not use late binding for methods marked as: (a) final (b) static (c) private (d) all of the above

D

The principals of object oriented programming include: (a) encapsulation (b) inheritance (c) polymorphism (d) all of the above

D

You cannot create an object using a/an: (a) superclass constructor (b) subclass constructor (c) ancestor class constructor (d) abstract class constructor

D

T/F Java allows an instance of an abstract class to be instantiated.

False

T/F Java uses late binding with private methods, methods marked final, or static methods.

False

T/F The final modifier is included before the definition of the method, then the method can be redefined in a derived class.

False

T/F The method clone has one parameter and should return a copy of the calling object.

False

T/F An abstract class is a class that has some methods without complete definitions.

True

T/F An abstract method serves as a placeholder for a method that must be defined in all derived classes.

True

T/F Downcasting should be used only in situations where it makes sense.

True

T/F Early binding enables the compiler to be more efficient.

True

T/F Late binding refers to the method definition being associated with the method invocation when the method is invoked at run time.

True

T/F Polymorphism refers to the ability to associate many meanings to one method through dynamic binding.

True

T/F The type of the variable naming an object determines which method names can be used in an invocation with that calling object.

True


Ensembles d'études connexes

Chapter 21: Personal Property and Bailments

View Set

International Marketing: Chapter 12

View Set

Chapter 27 - Reproductive System 2

View Set

community health exam 2 (CH. 2, 3, 4 , 6, 18, 19, 20)

View Set

Smooth Muscle Cell Function and Microstructure (1/7/15)

View Set