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

What is not thread safe?

1035


How do constructors use this() and super()?

1183


How many bits is a 64 bit byte?

1136


What does serializing data mean?

1000


Is zero a positive integer?

1140


How to implement an arraylist in java?

1246


What is n in java?

985


What is a text string?

1140


What is polymorphism and what are the types of it?

1037


What are streams in java 8?

1042


What are autoboxing and unboxing? When does it occur?

1010


Why do we need wrapper class?

1037


What are the 7 types of characters?

1126


How to change the priority of thread or how to set priority of thread?

1072


What exactly is a .class file?

1095