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











>> YOUR LINK HERE: ___ http://youtube.com/watch?v=WoAsR_8Rosw

Can we override a static method in child class? || Famous Interview Question • Static methods can not be overridden in the exact sense of the word, but they can hide parent static methods • In practice it means that que compiler will decide which method to execute at compile time, and not in runtime, as it does with overridden instance methods. • For a neat example have a look here. • And this is java documentation explaining the difference between overriding instance methods and hiding class (static) methods. • Overriding: Overriding in Java simply means that the particular method would be called based on the run time type of the object and not on the compile time type of it (which is the case with overriden static methods) • Hiding: Parent class methods that are static are not part of a child class (although they are accessible), so there is no question of overriding it. Even if you add another static method in a subclass, identical to the one in its parent class, this subclass static method is unique and distinct from the static method in its parent class. Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation: • https://www.youtube.com/c/Naveen%20Au... • Follow me on my Facebook Page: •   / naveenqtpexpert   • Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram: • https://t.me/joinchat/COJqZUPB02r5sB7... • Paid courses (Recorded) videos: • Java Selenium Course: http://www.naveenautomationlabs.com/p... • API Course: http://www.naveenautomationlabs.com/p... ➡️Get Our Courses✔️ • 📗 Get My Paid Courses at • Paid courses (Recorded) videos: • Java Selenium Course: http://www.naveenautomationlabs.com/p... • API Course: http://www.naveenautomationlabs.com/p... • ------------------------------- • ✔️SOCIAL NETWORKS • Facebook:   / naveenqtpexpert   • Twitter:   / naveenkhunteta   • Blog: http://www.naveenautomationlabs.com • -------------------------------- • Support My Channel✔️Or Buy Me A Coffee • Paypal: https://paypal.me/naveenkhunteta • Google Pay: [email protected] • -------------------------------- • ✔️Thanks for watching! • देखने के लिए धन्यवाद • Благодаря за гледането • 感谢您观看 • Merci d'avoir regardé • Grazie per la visione • Gracias por ver • شكرا للمشاهدة

#############################









Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org