What are the differences between Abstraction and Encapsulation?

1 answers

Abstraction and encapsulation are complementary concepts. On the one hand, abstraction focuses on the behavior of an object. On the other hand, encapsulation focuses on the implementation of an object’s behavior. Encapsulation is usually achieved by hiding information about the internal state of an object and thus, can be seen as a strategy used in order to provide abstraction.

shilpigupta22 shilpigupta22 [Author] 4 months ago votes 0