Abstraction Vs Encapsulation

preview_player
Показать описание
Abstraction Vs Encapsulation

Abstraction
Abstraction hides the internal implementation , and creates the skeleton of what is required for that Entity.
This is achieved by creating a class and defining the member variables, properties and methods inside it, as per the requirement.

Encapsulation
Encapsulation hides the data from external world. It protects the data within class, and exposes methods to the world.
This is achieved by using access modifiers like private, public, protected, internal.
Рекомендации по теме
Комментарии
Автор

Thank you, this is the first clear explanation I have found!

S.Passariello
Автор

I found both similar in your video. Don't understand anything. In Abstraction while defining the variable if we are not writing any access modifier then by default it will take private.

tarangrohit
Автор

This was the simplest explanation with example.

akshayraut