Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 5)
5.
What is the main advantage of encapsulation in object-oriented programming?
It simplifies the process of class instantiation.
It allows for the creation of multiple instances of a class.
It promotes code reusability.
It enhances data security by hiding implementation details.
Answer: Option
Explanation:
The main advantage of encapsulation is that it enhances data security by hiding the implementation details of an object, preventing direct access and manipulation.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.