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 the problem with multiple inheritance?
Which type does string inherit from?
What is constructor overloading in oop?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
Can we define a class within the interface?
What is destructor in oop?
How do you define social class?
What is solid in oops?
What is interface in oop?
What is data binding in oops?
Why do while loop is used?
what is the drawback of classical methods in oops?
Get me a number puzzle game-program
What is polymorphism in oop example?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).