Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 7)
7.
Which of the following best describes encapsulation?
Combining data and methods into a single unit and allowing unrestricted access to internal details
Hiding implementation details of an object and exposing only the necessary functionalities
Inheriting attributes and behaviors from another class
Using global variables for data encapsulation
Answer: Option
Explanation:
Encapsulation in Python involves hiding the implementation details of an object and exposing only the necessary functionalities.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.