Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 23)
23.
How does encapsulation contribute to code maintainability in object-oriented programming?
By exposing all implementation details of an object
By combining data and methods into a single unit
By allowing unrestricted access to internal details of an object
By hiding the implementation details of an object
Answer: Option
Explanation:
Encapsulation contributes to code maintainability by combining data and methods into a single unit, making the code more modular and easier to manage.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.