Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

Reg:Encapsulation

Ads

 
 

Share on Google+Share on Google+

Malleshwari
Reg:Encapsulation
1 Answer(s)      7 years ago
Posted in : Java Interview Questions
where we use encapsulation in programs?
how we know that is encapsulated?
Ads
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


Ads









Related Tutorials/Questions & Answers: