Explain in detail about encapsulation with an example?
Answer Posted / sivaprasad addepalli
Encapsulation is a mechanism which binds the attributes or
variables and methods together as a single entity known as
class.
ex:
class sample
{
public:
int a;
public:
void test()
{
}
}
Encapsulation is a concept of datahiding,
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How many unicode characters are there?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What is the function of java?
What is OOP Language?
os is developed in c no java is more secured then c na why dont the os developed is developed using java
What are the Main functions of Java?
What are selection structures?
What is the concept of multithreading?
Is sizeof a keyword in java programming?
What is the relationship difference the canvas class and the graphics class?
What is array in java?
How do you sort objects in java?
What is difference between core java and java ee?
Define canvas?
What is field name?