Object-Oriented Programming (OOP)

What is the function or purpose of Encapsulation?

Correct answer

C. An OOP principle that bundles data and methods together while restricting direct access to some components.

Explanation

Encapsulation refers to an OOP principle that bundles data and methods together while restricting direct access to some components.