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
Is null a string?
What will happen when using pass by reference in java?
What is an inner class in java?
Write a code to show a static variable?
What are the 5 types of research methods?
Why is the main method declared static?
What is type inference in java8?
What are the difference between string, string builder, and string buffer in java?
What do you mean by scope of variable?
How to display arraylist values in java?
Why object class is super class for every class in java?
what is the constructor and how many types of constructors are used in java?
What is file in java?
What is a flag value?
Which methods cannot be overridden in java?