What is encapsulation often associated with in OOP?
A) Data hiding.
B) Inheritance.
C) Method overriding.
D) Polymorphism.
Answer: A) Data hiding.
Explanation: Encapsulation is often associated with data hiding because it restricts direct access to an object's internal state. By using access modifiers (like private, protected, and public), encapsulation prevents unauthorized or accidental modification of data, ensuring that an object's internal representation can only be modified through well-defined methods.