Explain in detail about encapsulation with an example?
Answers were Sorted based on User's Feedback
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|
Answer / sanjay singh chauhan
it is way to combine field and mathod in a single entity
like a capsule ;
void m(int i)
//body of this mathod ;
like this way;
|Is This Answer Correct ?||6 Yes||0 No|
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|
Answer / sivaprasad addepalli
Encapsulation is a mechanism which binds the attributes or
variables and methods together as a single entity known as
Encapsulation is a concept of datahiding,
|Is This Answer Correct ?||4 Yes||0 No|
What technique can be employed to compare two strings?
What is a conditional statement explain with example?
What does the “final” keyword mean in front of a variable? A method? A class?
why would you use a synchronized block vs. Synchronized method? : Java thread
why java is better then .net?
What are singleton services?
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.
How can we create a synchronized collection from given collection?
What one should take care of, while serializing the object?
Difference between object instantiation and construction ?
What is character in data type?
Can we override protected method in java?