Syntax error Why can’t we override static methods in Java?

Why can’t we override static methods in Java?



Overloading is the mechanism of binding the method call with the method body dynamically based on the parameters passed to the method call.

Static methods are bonded at compile time using static binding. Therefore, we cannot override static methods in Java.

Updated on: 2019-07-30T22:30:20+05:30

5K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements