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

If system.exit (0); is written at the end of the try block, will the finally block still execute?

1038


Can you explain the final method modifier?

954


Can we declare the static variables and methods in an abstract class?

937


What is the file type?

963


When is the finally clause of a try-catch-finally statement executed?

977


Which methods cannot be overridden in java?

923


What is the Concept of Encapsulation in OOPS

938


What is the epoch date?

951


what is the purpose of "virtual"?

1016


can I implement my own start() method? : Java thread

934


Objects or references which of them gets garbage collected?

915


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

1044


What is an abstract class and what is it’s purpose?

907


Why are arrays useful in java?

973


What is anagram of a string?

887