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

What java is used for?

1025


How to make a non daemon thread as daemon?

1012


What is set string?

1080


How do you write a scanner class in java?

953


What do you mean by formatting?

938


What does s mean in regex?

954


What is close method? How it's different from Finalize & Dispose?

998


How many unicode characters are there?

981


What is the difference between size and length in java?

927


Is java an ide?

922


Can you use this() and super() both in a constructor?

930


How do you compare two objects?

877


Is array size fixed in java?

919


Explain java code for recursive solution's base case?

970


If a method is declared as protected, where may the method be accessed in java programming?

939