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

What is difference between char array and string?

1181


What is an argument java?

1025


What are the features of junit?

1091


What is hashing principle in java?

1083


Where are register variables stored?

1056


What environment variables do I need to set on my machine in order to be able to run java programs?

1063


What is equlas() and hashcode() contract in java? Where does it used?

1201


What is a singleton class? Give a practical example of its usage.

1149


What is functional interface in java?

1095


What is keyword and identifier?

1191


Explain throw keyword in java?

1096


What is difference between equal and == in java?

1008


What are different access specifiers in java?

1061


What is an class?

1095


What is lastindexof in java?

1178