Answer Posted / maddy

Data Encapsulation is the process of combining data and
functions into a single unit called class. By this method
one cannot access the data directly. Data is accessible
only through the functions present inside the class. Thus
Data Encapsulation gave rise to the important concept of
data hiding.

Example:

public class class1
{
void role1();
void role3();
}

class1 c=new class1();
c.role1();
c.role3();

---
dotnetpages.blogspot.com

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data type in c++?

757


How can you differentiate between inheritance and implementation in c++?

888


Is c++ a difficult language?

770


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

747


Do the parentheses after the type name make a difference with new?

849


How do I exit turbo c++?

777


What is the use of 'using' declaration in c++?

844


What are literals in C++?

780


Do the names of parameters have to agree in the prototype, definition, and call to the function?

810


What is runtime polymorphism in c++?

828


What is vector processing?

905


What is buffer and example?

706


Name the debugging methods that are used to solve problems?

763


What is the cout in c++?

775


What is virtual table?

817