Question - What Are The Three Levels Of Method Access Control For Classes And What Do They Signify? What Do They Imply About The Method?
Answer -
Public, protected, and private.
- Public methods can be called by all objects and subclasses of the class in which they are defined in.
- Protected methods are only accessible to objects within the same class.
- Private methods are only accessible within the same instance.