-
Which of the following statements is correct?
-
- Public method can only be called by object of its class
- Public method is accessible only to subclasses of its parent class
- Public method can be accessed by calling object of the public class
- Public method is accessible to all other classes in the hierarchy
- None of these
Correct Option: D
Public method is accessible to all other classes in the hierarchy