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

Name component subclasses that support painting in java programming?

638


How many types of interfaces are there?

578


Difference between class#getinstance() and new operator ?

649


Can we use string in the switch case?

577


explain the concept of virtual method invocation in polymorphism in detail?

1718






What is entry set in java?

539


How many bits is a float?

543


Is void a data type?

540


What happens if I remove static from main method?

525


Are registers volatile?

533


how would you implement a thread pool? : Java thread

508


What is a boolean used for?

590


What is the use of private static?

535


How will you add panel to a frame?

647


Is there a jre for java 11?

558