Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / sivakishorereddy(badvel)

-Encapsulation is wrapping of data(Data members) and
associated methods(member functions) into a single unit in
such a way that data can be accessed with the help of
associated methods.
--In a class we can specify the variables(Data members) as
private. So for other classes it will not be accessible.
--Through methods(member functions) only we can access the
member variables or modify them.
--It gives more security for our data. It is nothing but
data hiding.

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you add an element to a hashset in java?

960


What is a function easy definition?

967


What are methods of a class?

985


Describe what a thread-local variable is in java?

974


How to change value in arraylist java?

1112


How many digits is int32?

939


What are the differences between Java 1.0 and Java 2.0?

2218


What is the difference between static binding and dynamic binding?

1059


Explain the public class modifier?

909


Why is whitespace important?

1027


Does importing a package imports its sub-packages as well in java?

935


What is a blocking method in Java?

1153


What does regex mean?

963


Do you know why doesn't the java library use a randomized version of quicksort?

917


What is a method signature java?

998