Abstraction and Encapsulation are the 2 of the 4 building blocks in OOPS. In the previous posts, I have already blogged in a separate post on Abstraction and Encapsulation . In this blog post let's try to understand what is the difference between encapsulation and abstraction.
Encapsulation is all about building the functionality of an entity inside a class hiding the complexity so that users of such classes can use them without worrying about how the stuff has been implemented.
Where as abstraction is all about what a class provides to the developers. With abstraction developers only look at what a class provides looking at the interfaces/abstract classes it implements.
No comments:
Post a Comment