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
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 ?
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.
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.
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.
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....💯🤞
All Clear with very Simple and easy to understandable Example 👍😊
good one ,method hiding finally cleared after 3 yrs
God will always bless you !! You are doing the best job .. thank you
Bahut badiya video . Really appreciate your efforts 👌👌👌👌👌🙏🙏🙏🙏
God bless you Mr Naveen..u r really helping lot of people.🙏
Thanks for the easy explanation .
Amazing stuff Naveen. The way you taught is commendable.
Such a fantastic explanation!! Thanks
very clear explanation and easily understood...👏😊
You are simply awesome 😎
Thanks for explaining it clearly..
Thanks a lot..very well explained
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
Awesome explanation
Thanks...I'm clear now
Nice explanation 👍
Amazingly done! Thanks a lot for helping us.
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 ?
Dislikes are from other RUclips channels
Overriding main method not possible right, may i know why
hi sir can u plz explain about BUT keyword and * in cucumber framework
Thanks so much Naveen, for clearing this.
nice explanation naveen thx :)
please also explain why we can't override the static method
thanks.
Can we mark the method as final in super class for method hiding.
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.
@@naveenautomationlabs Thank You.
Thank you bro
Thanks.
Hello, Can anyone please tell me any video to learn REGEX for testers?
Only word "FIDA" :)
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.
Question: Why can't we override static method?
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.