KnowledgeBoat Logo
LoginJOIN NOW

Computer Science

Differentiate Encapsulation and Inheritance.

OOP Intro Java

20 Likes

Answer

EncapsulationInheritance
Encapsulation binds the data and the functions that operate on that data into a single unit.Inheritance enables new classes to receive or inherit the properties and methods of existing classes.
It supports Data Hiding.It supports code reusability.
It keeps data safe from outside interference.It allows us to do hierarchical classification of data.

Answered By

6 Likes


Related Questions