Reg:Encapsulation

Reg:Encapsulation

where we use encapsulation in programs?
how we know that is encapsulated?
View Answers

May 5, 2010 at 4:40 PM

Hi Friend,

Encapsulation is a process of binding or wrapping the data into a single entity.This helps in hiding an object's data describing its state from any further modification by external component.

When we want to keep the data safe from outside interface and misuse, we have to use the encapsulation feature.It hide the details by making the fields in a class private and providing access to the fields via public methods.

Thanks









Related Tutorials/Questions & Answers:

Ads