what are the oops concept in java explain with real time
examples
Answer Posted / madhu
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:Any electronic Device
in that 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:A state Or Country
i.e different culture districts make a state.and different behaviours of states form a country..
I think it is good example
Inheritance:
The New Class is Existing from Old Class,i.e SubClass is
Existing from Super Class.
Real Time Example:
Father and Son Relationship is the Ever green example
Polymorphisam:
Sinle Form behaving diffreantly in diffreant
Situations.
Example:-
Camera Mobile
when we talk used as communicator,
When we go for a tour used as a camera.
When we want to enjoy used as a player or FM.
I think these all are real time experianceany.is there any
more answers send me my mail Madhu.jjj@rediffmail.com also.
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
Is arraylist an object in java?
What is stringjoiner ?
What do you mean by ordered and sorted in collections in java?
What is callablestatement? How you can call stored procedure to pass in parameter?
Why super is first line in java?
Can the garbage collection be forced by any means?
Is java still necessary?
Can a constructor have different name than a class name in java?
What are the drawbacks of singleton class?
What is the main method java?
How do you reverse sort a list in java?
how to prepare for IT Officers Interview in Banks
Can a class be final?
what is the difference between a threads start() and run() methods? : Java thread
Give the hierarchy of inputstream and outputstream classes.