• +91 9723535972
  • info@interviewmaterial.com

Ruby Interview Questions and Answers

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.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners