Examveda
Examveda

What is encapsulation in object-oriented programming (OOP)?

A. Binding data and methods together

B. Inheriting from multiple classes

C. Exposing internal implementation details

D. Restricting access to public methods

Answer: Option A


Join The Discussion

Related Questions on Inheritance and Polymorphism in Ruby

What is polymorphism in OOP?

A. The ability to hide implementation details

B. The ability to restrict access to certain methods

C. The ability for objects of different classes to be treated as objects of a common superclass

D. The ability to create multiple instances