what are the oops concept in java explain with real time
examples

Answer Posted / l.priya

We have the following oops concepts like
1.Abtsrction
2.Encapsulation
3.Inheritance
4.Polymorphism

Abstraction:

hiding unnecessary data from the users and making the
application as user friendly then it is called as
abstrcation

ex:Any mail account the user is simply filling the form and
he don't know ho it is developed.

Encapsulation:

Wrapping the data and code as a single unit is called as
encapsulation.

ex:Capsule is the best real time example for it.In it we
will have two types of drugs combined as single capsule.

Inheritance :
Acquiring the properties from one class(base class or parent
class)to another class(derived class or child class)is
called as inheritance.

Ex:Inventing laptop from desktop.

Polymorphism:

Single entity behaving in different forms is called as
polymorphism

ex:Mouse is for click the buttons and dragging the bars or
placing the pointer in a particular place.

Is This Answer Correct ?    57 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to create multithreaded program? : Java thread

499


What are some alternatives to inheritance?

551


How many characters is 2 bytes?

522


What is a static method in java?

530


What language is java written?

527






What does you mean in math?

533


How objects are stored in java?

542


What is map in java?

514


explain the difference between jdk and jvm?

555


What is the locale class in java programming?

525


What are the advantages of java?

506


Is nan false?

531


Which command from the jdk compiles a java program?

479


Can we sort array in java?

523


What is widening and narrowing in java? Discuss with an example.

554