• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in JAVA by
Q:
Can the static methods be overridden?

1 Answer

0 votes
by

No! Declaration of static methods having the same signature can be done in the subclass but run time polymorphism can not take place in such cases.

Overriding or dynamic polymorphism occurs during the runtime, but the static methods are loaded and looked up at the compile time statically. Hence, these methods cant be overridden.

Related questions

+2 votes
asked Feb 8, 2020 in JAVA by rahuljain1
+2 votes
asked May 31, 2020 in JAVA by SakshiSharma
...