Discussion Forum

Overriding static methods in java

Overriding static methods in java

by AGRIMA JYALA -
Number of replies: 1

Can we Overload or Override static methods in java?

In reply to AGRIMA JYALA

Re: Overriding static methods in java

by Ashutosh Bhatt -
No, we cannot override static methods because method overriding is based on dynamic binding at runtime and the static methods are bonded using static binding at compile time.
Yes, we can overload static methods. We can have two or more static methods with the same name, but differences in input parameters.