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

Answer Posted / chandramouli

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 also.

Thanks all
CM

Is This Answer Correct ?    1225 Yes 68 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why Java doesn’t support multiple inheritance?

627


How many types of methods are there in java?

519


What are loops in java?

546


In java, how we can disallow serialization of variables?

546


Why runnable interface is used in java?

564






Explain hashset and its features?

572


How does linkedlist work in java?

501


How garbage collection is done in java?

542


How do you escape in java?

570


What is the range of the short type?

573


Explain the significance of class loaders in bootstrap?

491


What are the differences between this and super keyword?

525


Explain how hashmap works?

586


What are the basics of core java?

540


How do I start learning java?

551