Vidyalelo
Ruby Programming · Q39

Object Oriented Programming (OOP) Concepts in Ruby

Programming · Ruby Programming · question 39

Q39

What is the purpose of encapsulation in Ruby classes?

A.
To hide the internal state of an object and restrict access to it
Answer
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

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board