View RSS Feed

Recent Blogs Posts

  1. What is overriding

    by , 04-26-2012 at 05:54 PM
    A method is sometimes inherited by a subclass from superclass which is not according the requirements. Perhaps, twenty methods are inherited by subclass & one among them is not right.
    Subclass in such case will be overriding those methods, by method redefinition.
    Method that is defined in superclass is not affected by this override.

    In following example, Cat class is the subclass & superclass includes Animal. Eat() method that has been inherited by the Animal ...