πŸ“Š Ruby
Q. What does the attr_accessor method do in Ruby OOP?
  • (A) Creates constructor methods
  • (B) Creates only a writer method
  • (C) Creates only a reader method
  • (D) Creates both reader and writer methods for class attributes
πŸ’¬ Discuss
βœ… Correct Answer: (D) Creates both reader and writer methods for class attributes

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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