Can you override private or static method in Java?

1 answers

A user cannot override static methods in Java, because method overriding is based upon dynamic binding at runtime and static methods are statically bound at compile time. A static method is not associated with any instance of a class so the concept is not applicable.

shilpigupta22 shilpigupta22 [Author] 4 months ago votes 0