What are concepts of OOPS and how are they implemented in
Java?
Answer Posted / tarangini
oops concepts are Encapsulation, inheritance, abstractio
and polymorphism.
Encapsulation: Buildingup of the data and methods as a
single unit is called encapsulation. It isolates the
members of one class from the members of another class, so
we can declare same variable in both the classes.
best example for encapsulation is: A Class
Inheritance: Producing the new classes from already
existing class is called inheritance. The newly produced
class contains the features of old class and it has its own
features.
the use of inheritance is reusability.
Abstraction: Hiding unnecessary data from the user is
called Abstraction.
Polymorphism: Poly means many. Morphism means forms.
If same object perfrom different tasks is called
polymorphism.
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
What is java and why do we need it? Explain
What is java ceil?
What is the difference between a switch statement and an if statement?
Is string a class?
Why we do exception handling in java and how many types of exceptions are there?
What is finally block?
What is __ init __ functions?
How many arguments can a method have java?
what is method reference in java 8?
explain copyonwritearraylist and when do we use copyonwritearraylist?
What does i ++ mean in Java?
What is a boolean output?
Is void a wrapper class?
Difference between arraylist and hashset in java?
What is annotation in java?