Exam 9: Inheritance

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

All fields declared in an interface

Free
(Multiple Choice)
4.9/5
(86)
Correct Answer:
Verified

D

This shows the inheritance relationships among classes in a manner that is similar to a family tree.

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

D

In Java, a reference variable is ________ because it can reference objects of types different from its own, as long as those types are related to its type through inheritance.

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

C

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

(Multiple Choice)
4.7/5
(85)

When a class contains an abstract method, you cannot create an instance of the class.

(True/False)
4.8/5
(78)

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

(True/False)
4.9/5
(79)

In the following statement, which is the superclass? Public class ClassA extends ClassB implements ClassC

(Multiple Choice)
4.7/5
(79)

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.8/5
(71)

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

(Multiple Choice)
4.9/5
(88)

All methods specified by an interface are

(Multiple Choice)
4.8/5
(64)

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

(True/False)
4.8/5
(68)

Because the subclass is more specialized than the superclass, it is sometimes necessary for the subclass to replace inadequate superclass methods with more suitable ones.

(True/False)
5.0/5
(76)

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

(True/False)
4.9/5
(78)

A subclass can directly access

(Multiple Choice)
4.9/5
(71)

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

(Multiple Choice)
4.9/5
(74)

In a class hierarchy,

(Multiple Choice)
4.8/5
(66)

A(n) ________ is a method that appears in a superclass, but expects to be overridden in a subclass.

(Multiple Choice)
4.7/5
(72)

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

(Multiple Choice)
4.8/5
(84)

When a subclass overrides a superclass method, only the subclass's version of the method can be called with a subclass object.

(True/False)
5.0/5
(82)

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

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

Filters

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