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

Answer Posted / devendra.m

OOPS Concepts are mainly 4
1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphisam
Abstraction:-Hidding non-essential features and showing the
essential features

(or)
Hidding unnecessary data from the users details,is called
abstraction.
Real Time example:TV Remote Button

in that number format and power buttons and other buttons
there.just we are seeing the butttons,we don't see the
button circuits.i.e buttons circutes and wirings all are
hidden.so i think its good example.

Encapsulation:

Writing Operations and methods stored in a single
class.This is Called Encapsulation

Real Time Example:Medical Capsuals
i.e one drug is stored in buttom layer and another drug is
stored in Upper layer these two layers are combined in
single capsual.

Inheritance:
The New Class is Existing from Old Class,i.e SubClass is
Existing from Super Class.

Real Time Example:
Father and Son Relationship

Polymorphisam:

Sinle Form behaving diffreantly in diffreant
Situations.
Example:-
Person
Person in Home act is husband/son,
in Office acts Employer.
in Public Good Cityzen.

I think these all are real time experianceany.is there any
more answers send me my mail mdevendra@gmail.com also.

Thanks all
Devendra.M

Is This Answer Correct ?    131 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we start a thread twice in java?

506


What is an class?

585


What is the difference between static method and instance method in Java?

560


Explain about method local inner classes or local inner classes in java?

561


What does indexof return in java?

529






What is the final keyword?

547


Explain about class in java?

608


What are constants?

592


How big is a gigabyte?

609


What are thread safe functions?

504


Can we define private and protected modifiers for the members in interfaces?

529


make a method which any number and any type of argument and print sum of that arguments.....

1373


What do you understand by synchronization?

584


What is difference between null and void?

523


What is nested loop? What is dangling else condition in it?

568