Object-Oriented Programming (OOP)
Which of the following best names the concept in which an OOP principle that bundles data and methods together while restricting direct access to some components?
- A. This/self keyword
- B. Method overriding
- C. Multiple inheritance
- D. Encapsulation ✓
Correct answer
D. Encapsulation
Explanation
Encapsulation refers to an OOP principle that bundles data and methods together while restricting direct access to some components.