What are concepts of OOPS and how are they implemented in
Java?
Answer Posted / tarangini
oops concepts are Encapsulation, inheritance, abstractio
and polymorphism.
Encapsulation: Buildingup of the data and methods as a
single unit is called encapsulation. It isolates the
members of one class from the members of another class, so
we can declare same variable in both the classes.
best example for encapsulation is: A Class
Inheritance: Producing the new classes from already
existing class is called inheritance. The newly produced
class contains the features of old class and it has its own
features.
the use of inheritance is reusability.
Abstraction: Hiding unnecessary data from the user is
called Abstraction.
Polymorphism: Poly means many. Morphism means forms.
If same object perfrom different tasks is called
polymorphism.
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
Are there structures in java?
What is use of static method?
What is math exp in java?
What are thread local variables?
Is break statement can be used as labels in java?
How can we access some class in another class in java?
What is method in java with example?
What value is a variable of the string type automatically initialized?
What is void class in java?
Which collection is sorted in java?
Difference between Linked list and Queue?
What is ‘has a’’ relationship in java?
What is loop in java?
How do you access command-line arguments within the code?
Why is singleton instance static?