πŸ“Š Ruby
Q. What does the protected keyword do in a Ruby class?
  • (A) It makes methods protected, accessible only within the class and its subclasses
  • (B) It makes methods private, accessible only within the class
  • (C) It makes methods public, accessible from outside the class
  • (D) It defines class variables
πŸ’¬ Discuss
βœ… Correct Answer: (A) It makes methods protected, accessible only within the class and its subclasses

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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