Monday, 3 March 2014

What is Inheritance?

  • Inheritance is the process of creating a new classes from an existing class.
  • The Pre-existing class is called base class or super class and
  • the new class is knows as derived class or subclass.
  • The newly created class have all the characteristics of its existing or base class and it can also add its own additional attributes and behavior too.
  • Inheritance allows the extension and reuse of existing code, without having to repeat or rewrite the code from scratch

No comments:

Post a Comment