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

Can we have more than one package statement in source file ?

580


What is meant by binding in rmi?

537


What is difference between path and classpath?

552


What is the exception hierarchy in java?

477


Why do we need data serialization?

537






why using interface interface ?

1496


v-model life cycle

1616


How many digits can a float hold?

525


Can a lock be acquired on a class in java programming?

526


In a container there are 5 components. I want to display all the component names, how will you do that?

1553


What is the difference between comparison done by equals method and == operator?

563


What do you mean by static variable?

563


Is string passed by reference in java?

541


What are 5 boolean operators?

612


Can we declare a class as abstract without having any abstract method?

547