KnowledgeBoat Logo

Computer Applications

How is Encapsulation useful in Object Oriented Programming? Explain

OOP Intro Java

123 Likes

Answer

Encapsulation restricts the free flow of data from one object to another. The data and functions are wrapped together in an object in such a way that the data of a particular object can only be used in associated functions. Thus, Encapsulation helps in protecting the data from unauthorised access.

Answered By

75 Likes


Related Questions