Question

Which of the following best illustrates Encapsulation in Object-Oriented Programming?

A Bundling data and methods together while restricting direct access to some components
B Allowing multiple objects to interact through message passing.
C Hiding complex implementation details from the user
D Enabling a class to inherit properties and methods from another class.
E Defining a one-to-many relationship between objects.
Practice Next

Hey! Ask a query