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

Answer Posted / bln

Encapsulation is process binding data with an object.
Object consists data and methods, where methods helps to
extract or set data.

All classes developed using OOPS concepts follow the
encapsulation.

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is deadlock? : Java thread

756


Can list be null in java?

779


What if constructor is protected in java?

773


What is mysql driver class name?

831


Can we sort set in java?

753


What is formatted output?

743


What is multi level inheritance in java?

775


Can you call a method in a method?

778


How are multiple inheritances done in Java?

863


What does int argc char * argv [] mean?

738


Explain exception chaining in java?

850


What is the difference between abstraction and encapsulation?

801


Why do I need to declare the type of a variable in java?

795


How do you convert an int to a double in java?

816


What does a void function return?

772