1
JavaIntermediate#puzzle#arrays
Static methods are resolved at compile time based on the reference type, not the runtime object type — this is called method hiding, not overriding. Since p is declared as Parent, Parent.greet() is called, printing "Parent".
Parent p = new Child(); p.greet(); // Output: "Parent" (static binding, based on reference type)