Skip to content

Can a static method be overridden?

```java class Parent { static void greet() { System.out.print("parent"); } } class Child extends Parent { static void greet() { System.out.print("child"); } }

Parent p = new Child(); p.greet(); ```

What is printed?