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


Please Help Members By Posting Answers For Below Questions

Explain the difference between abstraction and encapsulation.

545


How do you make a thread in java?

641


Garbage collection in java?

611


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

577


What is append in java?

639






What is method reference in java?

575


What is abstraction in java?

621


What is a percentage sign called?

627


What does || || mean in math?

521


What is the difference between inner class and nested class?

557


Can a variable be local and static at the same time?

556


What is volatile keyword in java

660


What is a lightweight component?

602


What is set string?

607


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

588