What is meant by Encapsulation? Can you write a class to
explain encapsulation?

Answer Posted / srinivasa

All the javabeans written in java follows encapsulation.
In java bean variables are declared as private for
security. will be accessed using setter and getter method.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about assignment statement?

836


What is the do while loop syntax?

797


What is a java list?

840


What is difference between an object and a class?

857


What do you mean by platform independence of Java?

778


Is java se free?

728


What is the difference between abstraction and encapsulation?

807


Convert Binary tree to linked list.

846


What is dot operator?

806


How does enum work in java?

798


What is the purpose of checked and unchecked exceptions in JAVA?

806


What is return data type?

798


Give an example of use of pointers in java class.

777


How do you decide when to use arraylist and linkedlist?

768


What are inbuilt functions?

763