Answer Posted / kirti
Encapsulation is the ability to hide the internal workings of an object's behavior and its data. For instance, let's say you have a object named Bike and this object has a method named start(). When you create an instance of a Bike object and call its start() method you are not worried about what happens to accomplish this, you just want to make sure the state of the bike is changed to 'running' afterwards. This kind of behavior hiding is encapsulation and it makes programming much easier.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is abstraction and encapsulation?
What is polymorphism and its types?
What is difference between inheritance and polymorphism?
What are the data types in oop?
What is the difference between static polymorphism and dynamic polymorphism?
Why interface is used?
What type of loop is a for loop?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
Can we override main method?
What is advantage of inheritance?
Why multiple inheritance is not possible?
What are oops functions?
What is the difference between a constructor and a destructor?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is coupling in oops?