Thank you for the explanation. When parent class reference refers to the child class object then, which method will be called method of the child class or method of parent class?
@Mukeshotwani4 жыл бұрын
Parent class
@ajeeshajayan5784 жыл бұрын
@@Mukeshotwani Thanks for your reply. So here, the parent class methods and overridden methods of child class(if any) will be called. Am I right?
@Mukeshotwani4 жыл бұрын
Hi Ajeesha I have discussed all possible scenarios here kzbin.info/www/bejne/bHbVZqN_es6mmas
@venkateshmarneni3853 жыл бұрын
Child method will be called
@naveenautomationlabs4 жыл бұрын
Perfect explanation, thanks for sharing it.
@Mukeshotwani4 жыл бұрын
Thank you Naveen
@venumadhav93113 жыл бұрын
Your videos are simple and easy to understand
@Mukeshotwani3 жыл бұрын
Glad you like them! Thanks Venu
@nayabshaik22822 жыл бұрын
Great Thanks Mukesh for your efforts to make us understand easily..
@Imran-M-4 жыл бұрын
Hi Mukesh, thanks for the video! Could you please post a video explaining the scope of "default" and "protected" access modifiers and real time implementation?
@Mukeshotwani4 жыл бұрын
Yes Imran will post soon.
@shaiksameer27764 жыл бұрын
In dynamic binding we can use super keyword to call parent class method?
@Mukeshotwani4 жыл бұрын
Hey Sameer yes if parent and child class has same method then super.method() can be used.
@shaiksameer27764 жыл бұрын
😊👍👍
@gaurabsharma29614 жыл бұрын
Hi, when I am implementing the methods of interface, I am also getting the @Override annotation also. Do I need to remove the annotations?
@Mukeshotwani4 жыл бұрын
Its not mandatory gaurav, you can either keep or remove.
@TheFiretiger203 жыл бұрын
it will be even more helpful if you show us some real life example in selenium . appreciate your work.
@Mukeshotwani3 жыл бұрын
Sure mate will do.
@akashakhil23913 жыл бұрын
Hello Mukesh, One question related to interface seeing the video when you compared overriding with implementation, can we just left the methods declaration as is and not write the body in the method which is getting override/implementing case of implementing an interface? How should it work? Thanks in advance :)
@Mukeshotwani3 жыл бұрын
Hi Akash, if you dont write anything inside the method (while implementing) then it wont make any sense. Even if you have no statement it will be method with no output.
@nainagupta49492 жыл бұрын
so in overloading, we define a method with the same name but the signature is required and in overriding, we define the same name method but signature is not must??
@justworkfine3213 жыл бұрын
But what to answer when interviewer ask that why runtime polymorphism decide to overiding why overiding is decided fot runtime polymorphism
@Mukeshotwani3 жыл бұрын
Hi RB, because method behavior changes depends on object or reference.
@monalikajain4 жыл бұрын
Hii Mukesh...great explaination...but have one doubt... In case of Inheritance: Parentclass obj= new childclass() then...we are able to get parentclass methods. but in case of method overriding: Parentclass obj= new childclass() we are able to get child class methods. Is it correct??????
@Mukeshotwani4 жыл бұрын
Hi Monali, in this case Parentclass obj= new childclass() both parent class and child class has same method so child class method will get called because it is overriding feature.
@sonamsoni32084 жыл бұрын
Hi Mukesh, What kind of guidance I will get if I join your you Tube channel by paying amount 159, please guide me.
@Mukeshotwani4 жыл бұрын
Hey Sonam, it is just a support program. Its completely optional.