Method Hiding in Java

A static method (class method) cannot be overridden in Java. But if a static method defined in the parent class is redefined in a child class, the child class’s method hides the method defined in the parent class. This mechanism…