Monday, February 20, 2017

Advantages of inheritance

  1. Reusability – by reusing the fields or methods we save the wastage of memory. In our example we need not to declare supplierName, supploerAddress & supplierContact 2 times in XYZLimited & ABCLimited. This is the beauty of inheritance.
  2. Reduced complexity of code.
  3. Dynamic binding can be achieved using inheritance.


No comments:

Post a Comment