Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Explain in detail about encapsulation with an example?

Answers were Sorted based on User's Feedback



Explain in detail about encapsulation with an example?..

Answer / ravikiran(aptech mumbai)

encapsulation is the one which will bind members and methods
into a single entity

Is This Answer Correct ?    9 Yes 2 No

Explain in detail about encapsulation with an example?..

Answer / sanjay singh chauhan

it is way to combine field and mathod in a single entity
like a capsule ;
class A
{
int i;
void m(int i)
{
//body of this mathod ;
}
}
like this way;

Is This Answer Correct ?    6 Yes 0 No

Explain in detail about encapsulation with an example?..

Answer / aditya mohata

encapsulation is hiding detalis which u dont wanna show it
publicly or u dont want it to b modified.

Is This Answer Correct ?    9 Yes 5 No

Explain in detail about encapsulation with an example?..

Answer / 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 ?    4 Yes 0 No

Post New Answer



More Core Java Interview Questions

What technique can be employed to compare two strings?

0 Answers  


What is a conditional statement explain with example?

0 Answers  


What does the “final” keyword mean in front of a variable? A method? A class?

0 Answers  


why would you use a synchronized block vs. Synchronized method? : Java thread

0 Answers  


why java is better then .net?

5 Answers   HCL, iGate,






What are singleton services?

0 Answers  


Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, and how can i force or acquire another thread for lock . Finally how to know thread is released from lock. Explain types of lock(like method level and block level) in thread.

1 Answers  


How can we create a synchronized collection from given collection?

0 Answers  


What one should take care of, while serializing the object?

0 Answers  


Difference between object instantiation and construction ?

0 Answers  


What is character in data type?

0 Answers  


Can we override protected method in java?

0 Answers  






Categories