Can inherit, example: Class a{public static void A () { System.out.println ("a");}} Class B extends A{}public class Test {public static void Main (string[] args) { B.A ();//output A, proving that A static method can be inherited }} cannot be Overwrite, example: class a{public static void A () { System.out.println ("a");}} Class B extends a{public static void A () { System.out.println ("B");}} public class Test {public static void Main (string[] args) { A A = new B (); A.A ();//The output is a }}java is not recommended to call the static method with the object, which can confuse people, please note.
You can override a static method, but the overridden static method does not support polymorphism.
The essence is because the static method only looks for the memory of the explicitly declared class at run time, which means it cannot be polymorphic. The operation of the virtual machine is like this, is the grammar provisions, there is no good explanation, as to what the public is not public is nonsense, said did not say the same
static method Java Inheritance