Is method hiding a form of Polymorphism?
问题 Polymorphism is the ability to take many forms. Method overriding is runtime polymorphism. My questions are: Is there anything like static polymorphism in Java? Can method hiding be considered a form of polymorphism? In this question's answer, it is said that static methods are not polymorphic. What is the reason for that? 回答1: If we run this test class A { static void x() { System.out.println("A"); } } class B extends A { static void x() { System.out.println("B"); } } class Test { public