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
Distinguish between a predicate and a function?
What does file separator do in java?
What are the 7 types of characters?
what are the states associated in the thread? : Java thread
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
Which is better singleton or static class?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is scope of a variable?
what is object-oriented programming in java?
What are the types of methodology?
What is singleton class example?
What is the dot operator?
Which method returns the length of a string?
What is the difference between hashmap and hashtable in java?
Differentiate between stringbuffer and stringbuilder in java.