explain how many oops concepts available in java with realtime
scenarios?
Answer Posted / sakthi k
Encapsulation
Wrapping up of data and member function
together. Eg: Capsule is the good example for encapsulation.
Polymorphism
Ability of an object to take more than one form.
Poly-Many, Mor-Shape. For Eg: Anniyan film .
Compile time polymorphism otherwise known as
Static polymorphism.
Runtime polymorphism otherwise known as Dynamic
polymorphism.
Abstraction:
Represents the information without including the
background details.
For Eg: ATM Machine . .It provides the results
without including the background transaction.
Inheritance:
The process of acquiring base class property is
known as Inheritance.
Types
*Single inheritance
*Multiple inheritance
*Multi level inheritance: Eg:grand father-
father-son relationship.
*Hierachical inheritance
*Hybrid inheritance
Object:
Real time entity(attributes). Collection of its
own property.
Everything in the world is considered as real
objects.
| Is This Answer Correct ? | 25 Yes | 2 No |
Post New Answer View All Answers
Can a class be defined inside an interface?
What is the collection interface?
Why there are some null interface in java? What does it mean?
Explain the init method?
Can a final method be overloaded?
What is an infinite loop in java? Explain with an example.
What’s the difference between unit, integration and functional testing?
What is difference between synchronize and concurrent collection in java?
Is array an object in java?
give an example for encapsulation?
Explain the difference between abstraction and encapsulation.
What is an example of a boolean?
what is deadlock? : Java thread
What is a treemap in java?
What is private static in java?