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

Explain covariant method overriding in java.

553


Can a class declared as private be accessed outside it’s package?

519


describe synchronization in respect to multithreading? : Java thread

515


What is function and method in java?

529


What are heterogeneous objects?

579






Is there any case when finally will not be executed?

529


what is the difference between preemptive scheduling and time slicing? : Java thread

541


What is the syntax and characteristics of a lambda expression?

571


What is hashtable and explain features of hashtable?

570


Write a program to check string is palindrome without using loop?

577


How can the checkbox class be used to create a radio button?

520


What is generic type?

580


What are the benefits of java?

580


What is codebase?

547


Can we have two methods in a class with the same name?

590