Publicis Sapient interview question

What is Encapsulation and explain with an example.

Interview Answer

Anonymous

6 Apr 2023

Encapsulation in Java is the process by which data (variables) and the code that acts upon them (methods) are integrated as a single unit.