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

Difference between abstract and concrete class ?

1264


How do you stop a thread in java?

1111


Which is fastest collection in java?

1145


Wha is the output from system.out.println(“hello”+null); ?

1211


What methodology can be employed to locate substrings inside a string?

998


What is difference between protected and private?

1142


How do you declare a variable?

1140


What is a boolean output?

1022


How do you write a good declaration?

1026


What is string builder in java?

1059


What is the difference between sop and work instruction?

976


How to find the index of the largest number in an arraylist java?

1113


What are the types of methodology?

1153


What is array command?

1259


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

1216