Can we override a static method in child class? || Famous Interview Question

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

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

  • @shindeajinkya2506
    @shindeajinkya2506 2 года назад +2

    Truly appreciate 🙏....
    Covered 3 or 4 imp questions in one concept thanks sir ....
    God bless u❤💯
    1. Static method overriding ?
    2. Main method overloading ?
    3. Method hiding ?
    4. Static method overloading ?
    Got all concepts....💯🤞

  • @SarangHoley
    @SarangHoley 5 лет назад +1

    All Clear with very Simple and easy to understandable Example 👍😊

  • @sumitgoyal385
    @sumitgoyal385 7 месяцев назад

    good one ,method hiding finally cleared after 3 yrs

  • @ExperienceLife007
    @ExperienceLife007 5 лет назад +2

    God will always bless you !! You are doing the best job .. thank you

  • @ayushgarg4327
    @ayushgarg4327 5 лет назад +2

    Bahut badiya video . Really appreciate your efforts 👌👌👌👌👌🙏🙏🙏🙏

  • @OdiaTalesBySwarna
    @OdiaTalesBySwarna 5 лет назад +2

    God bless you Mr Naveen..u r really helping lot of people.🙏

  • @nagasaimaddula56
    @nagasaimaddula56 7 месяцев назад

    Thanks for the easy explanation .

  • @akshaybhatia7977
    @akshaybhatia7977 5 лет назад +1

    Amazing stuff Naveen. The way you taught is commendable.

  • @reenamokha
    @reenamokha 5 лет назад +2

    Such a fantastic explanation!! Thanks

  • @khajazakiuddin931
    @khajazakiuddin931 5 лет назад +1

    very clear explanation and easily understood...👏😊

  • @swapnilbodade1336
    @swapnilbodade1336 5 лет назад +1

    You are simply awesome 😎

  • @simplesdtips8770
    @simplesdtips8770 5 лет назад +1

    Thanks for explaining it clearly..

  • @Pratyush.K.R
    @Pratyush.K.R 3 года назад

    Thanks a lot..very well explained

  • @pranay819
    @pranay819 2 года назад +1

    I have 2 questions -
    In case of method hiding -
    1. Cant we access the parent class method using Super keyword? Or
    2. Directly parentclass.method name?
    Thanks

  • @MultiPrasad99
    @MultiPrasad99 5 лет назад

    Awesome explanation

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

    Thanks...I'm clear now

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

    Nice explanation 👍

  • @TheJami2010
    @TheJami2010 5 лет назад

    Amazingly done! Thanks a lot for helping us.

  • @mahendratestingfy
    @mahendratestingfy Год назад

    Can we inherit static members ?
    As of my knowledge no we can't
    But in the internet i am getting yes and no both answers
    Which one is correct ?
    Can we inherit or not ?

  • @arunkumarcherukuru2213
    @arunkumarcherukuru2213 5 лет назад +6

    Dislikes are from other RUclips channels

  • @mohanrajdandy
    @mohanrajdandy Год назад

    Overriding main method not possible right, may i know why

  • @sandeepbandoju6785
    @sandeepbandoju6785 5 лет назад +1

    hi sir can u plz explain about BUT keyword and * in cucumber framework

  • @Sear-hh4gf
    @Sear-hh4gf 3 года назад

    Thanks so much Naveen, for clearing this.

  • @ADIL7777777777777777
    @ADIL7777777777777777 4 года назад +1

    nice explanation naveen thx :)

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

    please also explain why we can't override the static method

  • @mariabajwa8632
    @mariabajwa8632 5 лет назад +1

    thanks.

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

    Can we mark the method as final in super class for method hiding.

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

      Yes, you can make final method in parent class to prevent method overriding. But this is not method hiding. Method hiding is when you have a static method in parent class and same static method in child class (this is not method overriding). This is method hiding in Java.

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

      @@naveenautomationlabs Thank You.

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

    Thank you bro

  • @thiery572
    @thiery572 5 лет назад

    Thanks.

  • @dilrubaahmed8302
    @dilrubaahmed8302 2 года назад

    Hello, Can anyone please tell me any video to learn REGEX for testers?

  • @shareefshaik6057
    @shareefshaik6057 5 лет назад +1

    Only word "FIDA" :)

  • @ravireddyism
    @ravireddyism 2 года назад

    7.36 " it says the method start of type BMV must implement or override the super class method " this is what you are doing . it didn't tell us to not use static method. However you have to tell your students why you should not use static methods. I'm waiting for anyone to clarify.

  • @kishanchakra
    @kishanchakra 5 лет назад +3

    Question: Why can't we override static method?

    • @ashishkumarmishra2346
      @ashishkumarmishra2346 4 года назад +6

      Static means common..So anything is declared as Static means its common to all, meaning anyone can use without any permission just use it that's why you declared the method as static use it without changing in implementation part. But when you override any method this means you are changing the implementation part although the method name and signature are the same.That's the reason the static method cannot be overridden.