Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 52)
52.
What is the primary purpose of using encapsulation in object-oriented programming?
To expose all implementation details of an object
To hide the implementation details of an object and bundle data and methods into a single unit
To create global variables for easy access
To increase code complexity
Answer: Option
Explanation:
The primary purpose of encapsulation is to hide the implementation details of an object and bundle data and methods into a single unit.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.