Jul 27 in JAVA
Q: Can the static methods be overridden?

1 Answer

0 votes
Jul 27

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

0 votes
May 29, 2020 in JAVA
+2 votes
May 31, 2020 in JAVA
...