static methods are bound to their class at compile time and cannot be used polymorphically. When you declare a "static" method for Animal, it is always bound to the Animal class and cannot be overridden. Static methods are bound to a Class object, not to an instance of a class.
Regular methods are bound at runtime, so the JVM can look at your call at “saySomething” and try to determine if you are subclassing Animal, and if so, you have overridden the saySomething() method. Regular methods are tied to an instance of the object, not to the class itself.
That’s why you weren’t able to do this:
class Animal { public abstract static void saySomething(); }
Since "static" means "compile-time bound", it never makes sense for something to be static and abstract.
Brent nash
source share