πŸ“Š Ruby
Q. What does the `protected` keyword do in Ruby classes?
  • (A) Makes methods accessible only within the class and its subclasses
  • (B) Makes methods accessible only within the class
  • (C) Makes methods accessible only from outside the class
  • (D) Makes methods accessible from anywhere in the code
πŸ’¬ Discuss
βœ… Correct Answer: (A) Makes methods accessible only within the class and its subclasses

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
103
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate