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


Please Help Members By Posting Answers For Below Questions

What is the difference between a static and a non-static inner class in java programming?

525


What does function identity () do?

515


How to create an immutable class?

566


Which package is always imported by default?

541


Why pass by reference is not possible in java?

492






How will you invoke any external process in java?

600


Can you explain inner class.

588


How does varargs work in java?

607


When should you make a function static?

539


Differences between external iteration and internal iteration?

570


Can we create our own wrapper class in java?

539


What is the purpose of encapsulation?

538


What if static is removed from main method?

566


When super keyword is used?

590


Why do we need singleton?

535