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 / sanjay singh chauhan

it is way to combine field and mathod in a single entity
like a capsule ;
class A
{
int i;
void m(int i)
{
//body of this mathod ;
}
}
like this way;

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can constructor return value?

952


What is a flag variable?

968


Explain the protected field modifier?

1077


What is the syntax and characteristics of a lambda expression?

1040


Why do you canvas?

1039


Explain differences between checked and unchecked exceptions in java?

1058


What is the difference between choice and list?

1086


How to implement a multithreaded applet?

2665


Can vector have duplicates in java?

937


Why parsing is done?

977


Name component subclasses that support painting in java programming?

1060


Explain the difference between private, public, package and protected in java?

1040


What do you mean by jjs in java8?

988


Can a final variable be null?

1013


What is threaded programming and when is it used? : Java thread

1063