198k views
1 vote
Which of the following components of a super class is not inherited by its sub classes? Select one or more:

a. Constructors
b. Private methods
c. Non-static methods
d. Public methods
e. Mutators
f. Accessors
g. Static methods
h. Instance variables

User Ed Chapel
by
7.6k points

1 Answer

6 votes

Final answer:

Constructors and private methods of a super class are not inherited by its subclasses. All other listed components, provided they are not private, can be inherited.

Step-by-step explanation:

The components of a super class that are not inherited by its subclasses are constructors and private methods. Constructors are special methods that are called to create an instance of a class and they are not inherited because the subclass has its own constructor. Private methods are not inherited either because they are accessible only within the class that defines them. All other listed components (non-static methods, public methods, mutators (also known as setters), accessors (also known as getters), static methods, and instance variables) are inheritable unless they are declared private.

User Andylamax
by
7.9k points