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
How do you break a loop?
What is a variable and constant?
How to sort array in descending order in java?
Explain importance of inheritance in java?
What is object cloning in Java?
What is the use of default method in interface in java?
How will you call an Applet using Java Script Function?
What is procedure writing?
What do you mean by platform independence of Java?
Why is flag used in java?
What are the restrictions that are applied to the java static methods?
How to convert string to char and vice versa?
How do you compare arrays in java?
What is sizeof in java?
What is a function argument in java?