what is difference between abstraction and encapsulation? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what is difference between abstraction and encapsulation?

25th Jul 2016, 1:32 PM
Shubham Burghate
Shubham Burghate - avatar
4 Answers
+ 3
this difference can be understood easily with example of a capsule medicine. the process of hiding medicine inside the capsule is known as encapsulation. and the patient doesn't know about anything inside capsule is known abstraction. abstraction is achieved via encapsulation
25th Jul 2016, 7:18 PM
Vikash Sahu
Vikash Sahu - avatar
+ 1
thanks frnds
23rd Aug 2016, 4:57 PM
Shubham Burghate
Shubham Burghate - avatar
0
encapsulation is the process of binding data variables and methods inside a class is known as encapsulation and abstraction is the process of hiding background details only providing essential details
6th Aug 2016, 4:03 PM
sachin tomar
sachin tomar - avatar
0
wat I conclude that..abstraction is nothing but how data is hidden.. encapsulation is what Should be hidden or what to show or not
23rd Aug 2016, 4:59 PM
Shubham Burghate
Shubham Burghate - avatar