Answer Posted / rahul
Encapsulation can be described as a protective barrier
that prevents the code and data being randomly accessed by
other code defined outside the class.
Encapsulation is the technique of making the fields in a
class private and providing access to the fields via public
methods. If a field is declared private, it cannot be
accessed by anyone outside the class, thereby hiding the
fields within the class. For this reason, encapsulation is
also referred to as data hiding.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is encapsulation in simple terms?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
Which is not an object oriented programming language?
Can we override main method?
What is a null tree?
What is difference between polymorphism and inheritance?
to find out the minimum of two integer number of two different classes using friend function
What language is oop?
Why do we use encapsulation in oops?
What is encapsulation example?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is coupling in oop?
what's the basic's in dot net
Why is oop better than procedural?