explain oops concepts with examples?
Answer Posted / manoj donga
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 ? | 26 Yes | 8 No |
Post New Answer View All Answers
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
What is an infinite loop?
What happens to the Exception object after handling an exception?
How to sort an array from smallest to largest java?
Write a program in java to establish a connection between client and server?
What are the data types supported by java?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
Why is java so important?
What is map and hashmap in java?
What is difference between wait and notify in java?
What is use of static in java?
Can a static method be final?
Explain the scope of a variable.
What is an arraylist in java?
What are the differences between processes and threads?