explain oops concepts with examples?
Answer Posted / vikram chandra
OOP is Nothing but Object Oriented Programming.
In OOPs concept is implimented in our real life systems.
OOPs have following features
1. Object - Instance of class
2. Class - Blue print of Object
3. encapsulation - Protecting our data
4. polymorphism - Different behaviors at diff. instances
5. abstraction - Hidding our irrelavance data
6. inheritence - one property of object is aquring to
another property of object
Simple Ex.
Please assume u standing near a car. How to impliments our
OOPs concept for this scenario ?
Simple,
car is a object b'coz it having more functions.
car is a class b'coz it contain more parts and features
inside.
car is a Encapsulation B'coz it protected some unwanted
parts or functions to user
car is a Polymorphism b'coz it have different speed as
display in same speedometer
car is a Abstraction b'coz it hidding more parts by coverig
such as engine,disel tank
car is a Inheritance b'coz one car is a property of more
people. i mean your car is driving bu you, your friend and
your relatives.
| Is This Answer Correct ? | 101 Yes | 30 No |
Post New Answer View All Answers
Explain, java is compatible with all servers but not all browsers?
Can we use static class instead of singleton?
How do you bind variables?
what is the significance of listiterator in java?
What do you mean by scope of variable?
Is array serializable java?
How does indexof work?
What is java literals?
Which eclipse is best for java?
What is ascii format?
What is lossy conversion in java?
What's a method in programming?
Explain the difference between abstract class and interface in java?
Explain the usage of this with constructors?
Can a static class have a constructor?