P10

Ace your homework & exams now with Quizwiz!

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

True

Every class is either directly or indirectly derived from the Object class.

True

It is not possible for a superclass to call a subclass's method.

True

Private members of the superclass cannot be accessed by the subclass.

True

When a subclass extends a superclass, the public members of the superclass become public members of the subclass.

True

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

False

All methods in an abstract class must also be declared abstract.

False

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

False

If two methods in the same class have the same name but different signatures, the second overrides the first.

False

Inheritance involves a subclass, which is the general class, and a superclass, which is the specialized class.

false

When an interface variable references an object, you can use the interface variable to call any and all of the methods in the class implementing the interface.

False

Every class has a toString method and an equals method inherited from the Object class

True


Related study sets

CH2 - Application Layer (2.4-2.7)

View Set

L201 April Sellers FInal Exam ( Fall 2022)

View Set

Business Management Exam #2, Chapter 8

View Set

Gas Exchange and Transport questions 1-20 94- 106

View Set

Abeka 9th grade English reading quiz O

View Set