Q. What is the purpose of polymorphism in Ruby?

  • (A) It allows creating multiple instances of a class
  • (B) It allows restricting access to certain methods
  • (C) It allows objects of different classes to be treated as objects of a common superclass
  • (D) It allows hiding the implementation details of a class
πŸ’¬ Discuss
βœ… Correct Answer: (C) It allows objects of different classes to be treated as objects of a common superclass

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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