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
What is the difference between a loader and a compiler?
What is a predicate method?
Why does java not support operator overloading?
How to create packages in java?
What are abstract methods in java?
Why arraylist is not synchronized in java example?
Explain about strings in java?
Does java return by reference?
how to deploy apache tomcat server to weblogic server in java
What is the difference between serializable and externalizable interfaces?
Why main() method is public, static and void in java ?
What is the difference between Array and Hash Table?
Explain the difference between collection api and stream api in java8?
What is arrays fill in java?
What is bufferedwriter?