Hi I need for Best example with proper answer on these encapsulation and abstration. I have little bit confusion about both. If both is hiding the data then why there is need to use encapsulation? Why we use both if they are hiding the data?
Asked
Active
Viewed 136 times
-3
-
2possible duplicate of [How abstraction and encapsulation differ?](http://stackoverflow.com/questions/16938667/how-abstraction-and-encapsulation-differ) – cbr Mar 13 '15 at 07:41
-
also another good answer: http://stackoverflow.com/questions/8960918/how-encapsulation-is-different-from-abstraction-as-a-object-oriented-concept-in/8960961#8960961 – cbr Mar 13 '15 at 07:43
-
I am asking about both are doing hiding the data. Why we use both? – Kamesh Naidu Mar 13 '15 at 08:56
-
If you read these answers I'm linking you, you would understand that they hide **different** things. http://stackoverflow.com/questions/24626/abstraction-vs-information-hiding-vs-encapsulation – cbr Mar 13 '15 at 09:07
1 Answers
0
Encapsulation means Hide the complexity of object (ex. Car has engine , carburetor etc , but not need to know to drive a car) .
Abstraction means expose the essential feature of object (ex. Car has wheel, steering , gaire, accelerator, these are essentials to know for driving a car).

Kumar Manish
- 3,746
- 3
- 37
- 42