0
What is the difference between encapsulation and data abstraction?
1 Respuesta
+ 8
Encapsulation means hiding the data using access modifiers like public private etc and add restrictions. And also adding the method and variable into a single entity
Abstraction means hiding the complex implementation using interface or abstract class. e.g. Hiding the complexity of changing the gear in a car by providing gear interface known as abstraction. But if you see car as a entity having tyres and metal body known as encapsulation.