Asked by Kiauna Floyd on May 25, 2024
Verified
An abstract method cannot be modified by:
A) public
B) protected
C) private
D) none of the above
Abstract Method
A method declared in an abstract class that has no implementation and must be overridden by subclasses.
Private Modifier
A keyword in object-oriented programming languages that restricts the visibility of a class member, making it accessible only within the same class.
- Familiarize oneself with the boundaries and applications of method parameters and modifiers in specifying method behavior.
Verified Answer
MC
Merardo Cebreros
May 29, 2024
Final Answer :
C
Explanation :
An abstract method cannot have any implementation, and private methods cannot be accessed outside of their containing class, so there would be no way to implement or override the abstract method if it were private. Therefore, a private modifier cannot be used with the abstract method. The public and protected modifiers can be used with an abstract method.
Learning Objectives
- Familiarize oneself with the boundaries and applications of method parameters and modifiers in specifying method behavior.