Comparison: Inheritance & Polymorphism
Comparison Inheritance & Polymorphism Inheritance is the mechanism by which an object inherits all the properties and behaviors of its parent object. This is an important part of OOP (Object Oriented Programming System). Terminology used in inheritance Class: A class is a group of objects that share common properties. This is the template or blueprint from which the object was created. Subclass / Subclass : A subclass is a class that inherits from another class. It is also called a derived class or child class. Parent Class: It is the class from where the features are inherited by subclass. also called a base class/parent class. Reusability : As the name seggests, reusability is a mechanism which facilitates you to reuse the fields and methods of the existing class when you create a new class.You can use the same fields and methods as defined in the previous class syntax . class subclass name ext...