Capgemini interview question

Difference between Encapsulation and abstraction.

Interview Answer

Anonymous

Oct 30, 2021

Encapsulation is the thought process of hiding sensitive information from accidental access. And abstraction is the actual implementation of hiding details and showing necessary information. Class is the way to achieve encapsulation and properties is the way to achieve abstraction.