what are the oops concept in java explain with real time
examples

Answer Posted / praveena

OOPS Concepts are mainly 4
1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphisam

Abstraction:Hiding unneccessary data from user is called
Abstraction access specifiers like public,private etc are
used to provide different level in abstraction.


Encapsulation:Taking data and object in a single unity is
called Encapsulation.A class is example for Encapsulation.

Inheritance:creating anew class from existing class is
called Inheritance.reusability is main advantage in
inheritance.

polymorphism:if single mthod performs different task is
called polymorphism.

Is This Answer Correct ?    89 Yes 35 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum size of list in java?

543


Explain reverse a linked list recursive java solution?

533


State the merge-sort principle and its time complexity.

573


When should I use singleton?

521


What is executor memory?

522






how to handle exceptions in ejb?

1875


Justify your answer that you can't define a method inside another method in java, if you can then how?

606


Using callable statement how can you pass out parameters, explain with example?

590


What is used of static keyword in java?

592


What is the role of the java.rmi.naming class?

528


Why webdriver is an interface?

581


Can we declare the static variables and methods in an abstract class?

546


what is interface in java? Explain

532


What is a protected method?

596


How will you communicate between two applets?

632