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 ruby built on java?

959


What is complexity in java?

1053


Write a program based on Java script program.

1146


What is compareto () in java?

984


When arithmeticexception is thrown?

1034


What is string in java?

1018


What is the difference between reader/writer and inputstream/output stream?

1085


Can the garbage collection be forced by any means?

993


Which sorting algorithm is best in java?

990


What are the types of strings?

1035


What comes to mind when someone mentions a shallow copy in java?

1110


What is a protected class in java?

997


What is private static class in java?

1020


What are autoboxing and unboxing? When does it occur?

962


Explain the difference between throw and throws in java?

1007