What are the advantages of inheritance?
Answer Posted / shiavni
inheritance is a process by which object of one class
acquire the properties from the object of another class.
the major advantage of inheritance is reusability which
means that we can add additional feauters into an existing
class without modifying it. this is possible by deriving a
new class from an existing one. i.e. creating new class
called derived class from an existing or created earlier
class called base class. the derived class will have the
combined features of both the classes.
| Is This Answer Correct ? | 56 Yes | 17 No |
Post New Answer View All Answers
Is data hiding and abstraction same?
What is abstraction in oops?
How do you use inheritance in unity?
What is static in oop?
Is enum a class?
Why do we need polymorphism in c#?
explain sub-type and sub class? atleast u have differ it into 4 points?
Why is polymorphism used?
What are the types of abstraction?
Write a program to reverse a string using recursive function?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
What is class and object in oops?
what is the drawback of classical methods in oops?
What is object in oop with example?
What are the benefits of interface?