Polymorphism in (Tamil) with Tricky interview questions | Method overloading & override | OOPS

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 4

  • @sriramadithya4799
    @sriramadithya4799 3 года назад +1

    5:32 At line 5,Animal an = new Dog( ); and Dog an = new Dog ( ); gives the same output(walk-four).So,we can also achieve overriding by using the Dog class. Then why you are using Animal class instead of Dog class. Please explain me sir 🙏

    • @NaveenKumar-zn3ms
      @NaveenKumar-zn3ms 3 года назад

      You are creating obj for a child class which is already have (walk-four) ,method overriding is the concept which is dog class can specify its own implementation through animal class
      Animal(parentclass) an=new dog();

    • @sriramadithya4799
      @sriramadithya4799 3 года назад

      @@NaveenKumar-zn3ms thanks bro

  • @abinashimmortal7946
    @abinashimmortal7946 3 года назад +1

    Bro normal note pad use panukaaaa .. because neeka.. type pandrathu. Fast ta iruguthu ena nadanguthunae puriya mataiguthu..