How are encapsulation and abstraction related in java??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How are encapsulation and abstraction related in java???

please give answer in perfect words and please dont give any link to get this answer....please answer it in your own words....plzzzz reply....

7th Mar 2018, 2:53 PM
Harsh Agrawal
Harsh Agrawal - avatar
1 Answer
- 1
Encapsulation refers to hidding the implementation details of how something works. An axample of encapsulation would be a car. You don't need to know how the car works in order to drive it, the details of the car's inner workings are hidden or encapsulated. Abstraction is a bit (or byte) more complicated to explain but I think it could be best described as talking about something in a somewhat vague manner by taking away some details.
11th Sep 2018, 8:41 PM
Abdul Alhazred
Abdul Alhazred - avatar