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

What is the difference between a loader and a compiler?

530


What is a predicate method?

568


Why does java not support operator overloading?

662


How to create packages in java?

533


What are abstract methods in java?

658






Why arraylist is not synchronized in java example?

473


Explain about strings in java?

622


Does java return by reference?

538


how to deploy apache tomcat server to weblogic server in java

1599


What is the difference between serializable and externalizable interfaces?

572


Why main() method is public, static and void in java ?

600


What is the difference between Array and Hash Table?

549


Explain the difference between collection api and stream api in java8?

513


What is arrays fill in java?

547


What is bufferedwriter?

542