πŸ“Š Ruby
Q. What is the main purpose of a constructor in a Ruby class?
  • (A) To define getter and setter methods
  • (B) To create new instances of the class
  • (C) To define class methods
  • (D) To initialize instance variables
πŸ’¬ Discuss
βœ… Correct Answer: (D) To initialize instance variables

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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