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
What is the maximum size of list in java?
Explain reverse a linked list recursive java solution?
State the merge-sort principle and its time complexity.
When should I use singleton?
What is executor memory?
how to handle exceptions in ejb?
Justify your answer that you can't define a method inside another method in java, if you can then how?
Using callable statement how can you pass out parameters, explain with example?
What is used of static keyword in java?
What is the role of the java.rmi.naming class?
Why webdriver is an interface?
Can we declare the static variables and methods in an abstract class?
what is interface in java? Explain
What is a protected method?
How will you communicate between two applets?