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...

can any one tell me what is advantage of encapsulation

Answer Posted / shalini

any programming lang. constitutes of two parts
1. logics 2. data
out of the above two, data is more important coz logics
lost can be rewritten but data once lost can never be
retrieved, hence data is more imp, but in the languages
like C and C++, there is a high chance of loosing the data
coz of the global variable concept, there is a very high
insecurity coz of global variables. So in order to overcum
the disadvantage of global var, encapsulation was
introduced, coz encapsulation eliminates the concepts of
global var, and the entire data is encapsulated at one
place, what u call it as class...hence encapsulation forms
the basis for OOPS concept

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are register variables what are the advantages?

914


1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?

4978


Does java linked list allow duplicates?

982


Explain wait() method of object class ?

1235


What is hashtable and explain features of hashtable?

993


What is callable java?

990


Can we have multiple public classes in a java source file?

1207


what is the difference between yielding and sleeping? : Java thread

978


What is the difference between ArrayList and Vector? which one is better in Java

1156


Why singleton is not thread safe?

999


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

1184


What is the implementation of destroy method in java. Is it native or java code?

981


Why we use multi threading instead of multiprocessing?

1072


Can a constructor call the constructor of parent class?

1049


What is a Hash Table? What are the advantages of using a hash table?

1096