- 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.
- Reduced complexity of code.
- Dynamic binding can be achieved using inheritance.
No comments:
Post a Comment