可能重复:
覆盖静态方法和最终方法
子类main方法会覆盖超类main吗?希望超类中的主要方法被执行。请解释
main method is static method and static methods are not overridden.
So if you are calling Super.main(args[]) then main method of super class is called and if you are calling Child.main(args[]) then main method of child class will be called.
Static method are not overridden. 每个类都有自己的静态方法,它们永远不会被继承,因此它永远不会被覆盖为main is static