Exam 9: Inheritance

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If you don't provide an access specifier for a class member, the class member is given __________ access by default.

Free
(Multiple Choice)
4.7/5
(37)
Correct Answer:
Verified

D

An abstract class is not instantiated itself but serves as a superclass for other classes.

Free
(True/False)
4.7/5
(37)
Correct Answer:
Verified

True

Which of the following is the operator used to determine whether an object is an instance of a particular class?

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

B

If ClassC is derived from ClassB which is derived from ClassA, this would be an example of

(Multiple Choice)
4.8/5
(32)

A __________ member's access is somewhere between public and private.

(Multiple Choice)
4.8/5
(34)

When an "is a" relationship exists between objects, the specialized object has

(Multiple Choice)
4.7/5
(32)

In a class hierarchy

(Multiple Choice)
4.9/5
(42)

Protected class members can be denoted in a UML diagram with the __________ symbol.

(Multiple Choice)
4.8/5
(40)

When a class does not use the extends key word to inherit from another class, Java automatically extends it from the __________ class.

(Multiple Choice)
4.9/5
(32)

In an inheritance relationship, the subclass constructor always executes before the superclass constructor.

(True/False)
4.8/5
(42)

All fields declared in an interface

(Multiple Choice)
4.8/5
(36)

You can write a super statement that calls a superclass constructor but only in the subclass's constructor.

(True/False)
4.8/5
(39)

In the following statement, which is the subclass? public class ClassA extends ClassB implements ClassC

(Multiple Choice)
4.9/5
(36)

Which of the following shows the inheritance relationships among classes in a manner similar to that of a family tree.

(Multiple Choice)
4.8/5
(42)

Because every class directly or indirectly inherits from the Object class, every class inherits the Object class's members.

(True/False)
4.8/5
(35)

If a subclass constructor does not explicitly call a superclass constructor,

(Multiple Choice)
4.8/5
(34)

You show inheritance in a UML diagram by connecting two classes with a line that has an open arrowhead pointing to the subclass.

(True/False)
4.9/5
(36)

In the following statement, which is the interface? public class ClassA extends ClassB implements ClassC

(Multiple Choice)
4.7/5
(35)

When a class implements an interface, an inheritance relationship known as __________ inheritance is established.

(Multiple Choice)
4.9/5
(39)

If a method in a subclass has the same signature as a method in the superclass, the subclass method __________ the superclass method.

(Multiple Choice)
4.9/5
(42)
Showing 1 - 20 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)