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...

Explain in detail about encapsulation with an example?

Answer Posted / sivaprasad addepalli

Encapsulation is a mechanism which binds the attributes or
variables and methods together as a single entity known as
class.
ex:
class sample
{
public:
int a;
public:
void test()
{
}
}
Encapsulation is a concept of datahiding,

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java same as core java?

1047


What is the purpose of declaring a variable as final?

930


Does a function need a return?

923


How is treeset implemented in java?

967


What is an empirical question?

922


Why do we create public static method in java?

1055


What is the point of polymorphism java?

958


What are the two basic ways in which classes that can be run as threads may be defined?

1022


What does %d do in java?

993


Can a static class implement an interface?

1068


What is the main use of generics in java?

930


Is object a data type in java?

1066


Explain a situation where finally block will not be executed?

976


What is an example of a boolean?

1011


What is the use of object and class classes?

1006