Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Malleshwari
Reg:Encapsulation
1 Answer(s)      4 years and 8 months ago
Posted in : Java Interview Questions


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

Advertisement
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:
 

 

 

DMCA.com