explain oops concepts with examples?
Answer Posted / mudassir shakil
1.Encapsulation-means wrapping or grouping data in single e
unit.
e.g. if you are planning to do computer course in a
institute but you don't know which course is going on in the
institute.But they have printed paper in which all the
courses are written like java,.net etc. This is called
encapsulation.
2.Abstraction-means hiding non essential information.
e.g.-Consider the above example.you have decided for java
the you enters in the institute and tell your course.The
person will explain you about java like duration;fee
structure etc.In simple words abstraction means information
according to the user.
3.Polymorphism-different existence.
e.g-you are a son,brother,uncle,husband and friend at
different situation.
| Is This Answer Correct ? | 16 Yes | 5 No |
Post New Answer View All Answers
What is a Hash Table? What are the advantages of using a hash table?
What is a lambda expression ? What's its use ?
Explain the difference between an object-oriented programming language and object-based programming language?
What are new features introduced with java 8 ?
What is difference between an object and a class?
What is the use of runnable interface?
Why heap memory is called heap?
Can we overload run() method in java?
What is use of arraylist in java?
How is abstraction implemented in java ?
What are the advantages and disadvantages of object cloning?
Which sorting is used in arrays sort in java?
What is an empty list in java?
Differentiate between a constructor and a method? Can we mark constructors final?
Can we force the garbage collection to run?