πŸ“Š Ruby
Q. What is the purpose of encapsulation in Ruby classes?
  • (A) To hide the internal state of an object and restrict access to it
  • (B) To expose the internal state of an object and allow unrestricted access to it
  • (C) To define class methods
  • (D) To define instance methods
πŸ’¬ Discuss
βœ… Correct Answer: (A) To hide the internal state of an object and restrict access to it

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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