Explain about encapsulation?



Explain about encapsulation?..

Answer / Gaurav Kumar Tripathi

Encapsulation is a fundamental principle in Object-Oriented Programming (OOP) that helps to bind the data and functions together as a single unit, known as a class. This mechanism prevents data from being accessed directly by other parts of a program and ensures that objects can only be manipulated through a defined interface. Encapsulation increases the overall stability, modularity, and maintainability of the code.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

Can an interface implement or extend another interface?

1 Answers  


What is a pure virtual function?

4 Answers  


How does abstraction differ from encapsulation.

1 Answers  


What do you meant by static and dynamic modeling?

7 Answers   NIIT,


What is the practical implementation of inner classes?

1 Answers  


Why do we separate interface from implementation?

1 Answers  


What is virtual multiple inheritance?

1 Answers  


Can you explain primordial class loader?

1 Answers  


What are the four phases of the Unified Process ?

8 Answers   Protech, Student,


Explain about a class in oop?

1 Answers  


Difference: 'uses', 'extends', 'includes'

7 Answers   Cognizant, Protech, TY, University,


What if we make the method as abstract in another interface?

1 Answers  


Categories